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?
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鈥檛 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鈥檛 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
Most helpful comment
I haven鈥檛 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鈥檛 expand its own public api so to speak, but leverages that library to manage webpack configuration chaining.