Angular-cli: webpack-merge approach to 'eject'

Created on 24 Sep 2017  路  6Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [X] feature request

Versions.


Latest

Desired functionality.


Currently the webpack eject approach dumps the entirety of the internal webpack configs into editable files. This completely detaches the configs from the CLI and any subsequent updates to the lib are not reflected in these configs.

I suggest a better approach would be to eject config stubs which leverage webpack-merge to allow us to selectively merge in different functionality. This would allow us to continue getting the latest and greatest CLI updates but still give us some flexibility to support custom use-cases.

Mention any other details that might be useful.


Related to https://github.com/angular/angular-cli/issues/6731

All 6 comments

Heya, I'm sorry to say but this is essentially a duplicate of https://github.com/angular/angular-cli/issues/1656, with the official answer for now being there. I'll bring it up internally again to see if something changed though.

Sorry, missed that one

With something like this, resolving issues like #9107 would be trivial. I don't even would like something like the entire file to be merge, but better just to be able to override some of the default configuration.
So, maybe something that would fit in Angular-CLI and also, would allow the users to customize is to allow to override certain webpack configurations through .angular-cli.json file.

Definitely agree with @michaeljota, a simple override in Webpack's "target" setting would solve my issue quite satisfactorily, eliminating the need for ejecting my app and keeping @angular/cli's commands functional as always.

I would also love to be able to override or define webpack's target setting... Currently we have to use an external and as of now unsupported package to work around that, and we dislike ejection for the reasons pointed above.

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

Related issues

sysmat picture sysmat  路  3Comments

naveedahmed1 picture naveedahmed1  路  3Comments

brtnshrdr picture brtnshrdr  路  3Comments

rwillmer picture rwillmer  路  3Comments

rajjejosefsson picture rajjejosefsson  路  3Comments