Is your feature request related to a problem? Please describe.
Currently, the init generation is a bad DX with support for custom scaffolds completely broken.
Describe the solution you'd like
Generate pre-defined configurations instead of creating one using AST transforms. The implementation will be done in steps:
Describe alternatives you've considered
N/A
Additional context
/cc @webpack/cli-team
After this we should not have jscodeshift in our deps
Also we should always generate webpack.config.js
And we should not exist with -1 code when somebody press CRTL + C on init (try it using npm init)
@rishabh3112 What is status? I want to finish it for the next release
@rishabh3112 What is status? I want to finish it for the next release
It works as we need. I have added tests as well. Will rebase and then we can merge it.
@rishabh3112 Do we drop jscodeshift from our deps?
@rishabh3112 Do we drop
jscodeshiftfrom our deps?
Yup its not needed now for init. Will remove it from deps as well.
All done ✨
Will be adding more templates for react, vue, node-packages etc in further PRs 😎
Documentation will be tracked on https://github.com/webpack/webpack.js.org/issues/4741
Now available in latest release ✅
TODO: Adding templates for common usecases (https://github.com/webpack/webpack-cli/issues/2430#issuecomment-793683956) - WIP
mode (eg. css-minimizer-webpack-plugin only in production)
Do you want to extract CSS for every file?
<ul>
<li>Yes</li>
<li>Only for production</li>
<li>No<br />
PWA support too?
Do you need plugin for service workers?