-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Dedicated webpack.config.js without ejecting #6100
Comments
This idea gets brought up a lot, so you should check the issue tracker for other responses that put it more eloquently, but the gist is probably not. The reasoning is that exposing custom hooks to webpack makes create-react-app's api as large as webpack's. How can cra make compatibility guarantees if you can use every feature of the version of webpack it currently bundles? webpack is expressly not a part of cra's public api for that reason. |
I haven’t done that much research but from what I can see, vue-cli uses https://github.com/neutrinojs/webpack-chain. Using that same library, it sounds like CRA could add this feature with the expectation that it doesn’t expand its own public api so to speak, but leverages that library to manage webpack configuration chaining. |
We currently have several other discussions regarding this: #6303 |
Feature Request
After using the new vue-cli 3 for a hobby project, I think it would be great if create-react-app could follow suite with something similar to its webpack configuration, see https://cli.vuejs.org/guide/webpack.html#simple-configuration.
The tldr is that we could add a
webpack.config.js
to the root of the project folder that's optional, and it accepts the webpack modules and we can chain / configure webpack without ejecting. This is great because really, the only customized pieces I need for webpack for my purposes are:I've come to a really annoying standstill with the create-react-app because I can't load markdown files - I need to manually add a raw-loader so I can use
markdown-to-jsx
(see #3722 ). I don't want to sacrifice ejecting my create-react-app that will break future versions of webpack for example - but I need to have some sort of customization of webpack configuration. Thoughts?The text was updated successfully, but these errors were encountered: