-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] A hook file to customize webpack config. #10954
Comments
Thumbs up and upvote! Would probably eliminate most peoples need to eject at all as I know it would us. |
I'm really sorry that I have to close this issue but this is still a duplicate of #1656, and our stance on this topic still has not changed. If it changes, we will announce it on that issue. |
@filipesilva Any word on the "addon" system that's been in the works for 2 years?
|
The new workspace is part of that addon system. It provides extension points from where you can change what The upcoming eject (#10946) leverages that. The plan is that doing If you replace the ejected target name (this is the keys inside the |
@filipesilva But In NG5 our workflow was thus: Ever so often, we'd have to do 4 separate The argument @hansl comes forth with in that topic doesn't really hold water IMO. You argue that you don't want to expose the novice user to complex subjects like a webpack config file. But then how is doing an optional I can only beg of you to bring this issue up again whenever you have an internal meeting. I cringe by the thought of having to |
The webpack configuration you would get in CLI 1.x when doing The CLI 6.x eject will give you a simple webpack config that does the main things we do inside the CLI. The idea there is to never eject more than once. You should be able to eject, do whatever you need with that config and build using. Meanwhile you can still build with the default Angular CLI build system. These will be separate but not mutually exclusive. |
This comment from an eject related issue is relevant here as well: #10945 (comment) |
Disappointing to see the Angular team rejecting collaboration and would rather close tickets and lock them than keep an open ticket on the subject allowing for discussion... There is a reason that this #1656 (comment) is so heavily rejected by the community. |
How is this issue still going on. I've spent 2 days reading through post starting in 2016 relating to this issue. There needs to be a better way than simply running a post install patch directly into the node module to allow for minor webpack tweaking. |
I understand the amount of maintenance problems that would come from exposing the full webpack.config. But I also think that it is totally nonsense to need to Why not compromise a bit and expose some parts of the webpack.config with a simple plugin/hook system? Also you could easily do this while throwing a "At your own risk!" warning.
|
I can't believe that we're in 2018 and this issue is still alive. I'm finding myself in the need to use google-fonts-webpack-plugin and without ejecting I can't do it. I fail to see why it's so complicated to use webpack-merge and merge it with whatever file the user can specify through the CLI and get it done. 2 years on this? come on... I used to do this almost daily in all my projects, and they were easily overridable, however, I'm being forced to use the CLI and I can't find a way to override just a specific portion of the config (adding a plugin). Come on, this is basic stuff, give the user a choice or the possibility to do so. |
Check out angular-cli-customizer - did the trick for me |
@urish Awesome!! Exactly what I was looking for! Someone give these men a beer and include this as a core functionality in the CLI. I can't believe someone had to hack it... still, great. |
There's also this unofficial plugin, that does what I initially requested: I really still would like official support though... |
Yes, what a pita, I just upgraded an old app, which suddenly stopped working due to Ugh |
It would be so great to have an option to customize angular-cli config with webpack.config.js file, just like webpackMerge |
Please, people need to merge advanced configuration in the cli, we're not in kindergarten here. |
Please add soon! |
+1 The recent upgrade to angular 7 completely broke coverage reporting in our monorepo setup. The response from the Angular team was that it was "by design". All I need to do to fix this is to disable a single line in the I'm seriously starting to consider switching my team over to There has to be some middle ground here :( |
I used angular-builders to patch Angular 7 configs. |
This works pretty nice, but only for the applications. If you have multiple libraries in your repo consumed by the application, then custom webpack builder will not help. Referenced custom webpack builder hooks only into So yea, in a bit more advanced situation we have no workaround at all. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Intro
We dearly need a lightweight way to customize the internal webpack config file, so advanced users can tweak it, and still use the CLI, without having to eject. The current approach of having to eject causes a huge amount of overhead (also for the CLI team it seems). In NG5, we personally had 4 different fully complete webpack config files, to satisfy our dev environment, which was getting out of hand.
Since you can't eject in NG6, you currently have people rewriting
node_modules
files, to do some simple customizations. See https://gist.github.com/niespodd/1fa82da6f8c901d1c33d2fcbb762947dProposal
Doing an
ng serve/whatever
calls a hook file, where you can customize the webpack config related to the currentng
command.A hook file like this would probably remove the need to eject in the first place.
Was originally posted here, where it seemed to gather support: #1548 (comment)
The text was updated successfully, but these errors were encountered: