-
Notifications
You must be signed in to change notification settings - Fork 96
Better way to manage webpack config #19
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
Comments
@stereobooster as author of webpack-config I'm happy to help you and answer on any questions. I created my projects to solve the same issues that you have. PS: Also I would mention webpack-merge by @bebraw. |
I agree that merging config with the default
But after creating the app, |
Other question to ask if CRA team want to open doors for such projects and adopt any of listed above techniques, like
Offtopic: interesting that gulp shares same problem - easiest way to share code is copy-paste and you spend a lot of time on project setup. But gulp feels a bit more comfortable for me, because program in JS much easier than to program in JSON. |
Closing this for now. The way that the config is managed in webpack is not a major priority right now. Something similar is also being discussed in the create-react-app repo. |
@kitze Yeah. If you have time, consider giving webpack-merge a quick go. I expect it would go a long way if you could provide a place where to literally extend the core configs. You would have to intercept before passing the configuration to webpack but after that you could do quite a few things. I guess the main problem is that you would be operating against a black box still. I expect simple configuration, like adding a new loader or plugin, would be easy, but for anything more complicated than that you would have to eject. Still, that would be far better than the current situation I think as staying without ejecting as long as possible would be extreme useful when it comes to maintenance. |
Found another interesting approach https://medium.com/@tacomanator/customizing-create-react-app-aa9ffb88165#.fo1dq49rf |
one more in collection https://github.com/andywer/webpack-blocks |
I suppose I'm not the only one who finds Webpack configuration hard to maintain.
Configurations are not portable/sharable: there is no (good) way to pack configs in modules and reuse across a project. I want to be able to do something like install module
webpack-sass-config
and it will work out of the box with reasonable defaults (Convention over configuration).As of now default way to share code across projects is copy/paste. Including this project which patches initial webpack (and this is error prone and hard to maintain).
I know this is problem of webpack not this repo, but this problem is big part of this project which is why I'm creating issue here. Maybe we can come up with reasonable solution.
There are some projects which tried to solve this:
related: facebook#670
The text was updated successfully, but these errors were encountered: