-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
User Webpack config auto discovery #255
Comments
I have only one minor note:
It should probably firstly try to locate One more thing is that isn't clear from the above is what will it take to add the path the webpack config to |
What happens if there is I'm not sure about the I think, with CRA it should definitively just work out of the box. With the manual installation, I think it's okay to have the I think it's less magic but still very simple. |
Could you point me to the code where they do it?
The same as before but now it’s optional.
That’s very good idea!
To disable magic.
Exactly how I see it. |
Nope, I have no idea where it is. Search the repo?
Exactly. That's why I think for standalone apps this is too much magic.
It's settled then? 👏 |
We should try and see if that would work. I don’t see any problems for CRA, for Webpack projects only real testing will tell. I also want to include it in 5.0.0 release because it already has some breaking changes and this is a breaking change too. |
I think this is great! Let me know if I can assist 👍 |
@tizmagik We’ll need help with testing this at least ;-) |
As @bebraw suggested it should check if Webpack config exports a function and call it with a current environment as a first argument. |
With all changes I’ve already made for the upcoming 5.0.0 release (especially removal of
babel-loader
andcss-loader
) it might be possible to simplify things even further and make it “just works” at least for some users.Goals
How that should work
styleguide.config.js
orwebpackAutoDiscovery
option isn’tfalse
.a. If project has
react-scripts
dependency, usereact-scripts/config/webpack.config.dev.js
.b. Try to find
webpack.config.dev.js
orwebpack.config.js
.entry
,output
,plugins
sections.webpackConfig
andupdateWebpackConfig
options if they are present in style guide config.Will that work? What have I missed? What can be improved?
/cc @MoOx @okonet
The text was updated successfully, but these errors were encountered: