Skip to content

Allow partially overriding webpack config #7181

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

Closed
wants to merge 2 commits into from
Closed

Allow partially overriding webpack config #7181

wants to merge 2 commits into from

Conversation

svallory
Copy link

If a webpack.config.js file is found in the project root, it's loaded after all other configs so configuration can be overriden.

I need to compile pug (jade) but didn't want to eject the cli. So I implemented this. I think I ready somewhere you guys didn't it, but I'm not sure. Please, let me know if this will make into the cli. If not, I'll publish another package.

Thanks for the hard work, guys! You are awesome, I'm loving the cli!!

If a webpack.config.js file is found in the project root, it's loaded after all other configs so configuration can be overriden.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@devoto13
Copy link
Contributor

@svallory I believe you saw it in the AIO project. They patch Webpack configs there.
https://github.com/angular/angular/tree/master/aio/tools/cli-patches

@filipesilva
Copy link
Contributor

filipesilva commented Jul 31, 2017

I'm sorry but this isn't something we want to allow (extending/overriding config). You can see discussion on this topic in #1656.

@ibqn
Copy link

ibqn commented Oct 24, 2017

@filipesilva the discussion you are pointing to is locked! this merge request is blocked. Really? From Angular team point of view community does not has a right even to express its opinion. Angular and Google starts to SUCK!

@devoto13
Copy link
Contributor

@ibqn This is likely coming in CLI 2.0. See design doc.

@svallory
Copy link
Author

@devoto13 it's so damn simple it's shameful it isn't implemented now. Honestly, I don't see the point.

@devoto13
Copy link
Contributor

@svallory The problem is that if/when CLI switches to another build system instead of Webpack all projects with custom Webpack configs will get broken. This already happened when CLI replaced System.js with Webpack and I think authors don't want it to happen again. So that's why this "damn simple" feature has so "damn huge" implications :)

@svallory
Copy link
Author

svallory commented Oct 24, 2017

@devoto13 First, I'm sorry for lashing out, I was frustrated and didn't refrain myself.

I read the reason you mentioned somewhere, but I don't think that's a valid one. It's just a possible breaking change. Not that those are good, but with enough warning it's manageable. There are a lot of features for which we could say the same. And imho, I think most developers would be happy to take that risk given the huge benefit it brings. Right now the cli is all-or-nothing and it hurts to choose the "nothing" route when all I needed was, lets say, add jade templates.

But my point actually is: if it's going to make into version 2, why not put it into 1.3.1? That doesn't make sense at all to me. If it's not decided yet, that's fine. But once it is it should be released ASAP instead of waiting for a major version. I want to throw away my monkey patched compiler! :)

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants