Angular-cli: Provide eject command to export webpack configuration and dependencies to project scope

Created on 11 Sep 2016  路  5Comments  路  Source: angular/angular-cli

creat-react-app has a command eject export built-in config to project folder. I hope Angular CLI will provide such a feature to developer , provide an eject like command export the angular-cli internal config(webpack, tslint config and dependencies etc) to the project and allow developers to customize it.

https://github.com/facebookincubator/create-react-app/blob/master/template/README.md#npm-run-eject

  1. eject command only can be executed once(unless the config is allowed to be overridden via some command arguments )
  2. other commands still can be used after the configurations are ejected.

Most helpful comment

Since protractor.conf.js and karma.conf.js are generated in project root folder, I can't see too many reasons why not generate a webpack.config.js, too. The generated config could simply require the default config, e.g.

module.exports = require('angular-cli/models/webpack-build-{dev|mobile|production|..}.js');

Reason I could think of to not expose webpack artifacts, have the build tool transparent to the developer. Is that the intention? Is it due to the webpack / system.js migration?

All 5 comments

Since protractor.conf.js and karma.conf.js are generated in project root folder, I can't see too many reasons why not generate a webpack.config.js, too. The generated config could simply require the default config, e.g.

module.exports = require('angular-cli/models/webpack-build-{dev|mobile|production|..}.js');

Reason I could think of to not expose webpack artifacts, have the build tool transparent to the developer. Is that the intention? Is it due to the webpack / system.js migration?

@hansl Can this be closed now?

@Dinistro It seems https://github.com/angular/angular-cli/commit/7ac0d05 included this feature.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings