Well that’s not exactly true, but we’re soon there! For you to have a better time figuring out if this will affect you or not, we’ve composed a post about what we are going to change.
Much of webpack-cli, from last year to this one has been centered around scaffolding and reducing entry requirements when getting started with webpack. We are trying to create a good ecosystem for users to compose their configurations through scaffolding and automating their configuration setup.
Since then, we have fixed issues, cleaned up source code and laid the foundation of which, we are trying to create a good developer experience from.
Changing repository structure
When using webpack-cli in the future, we are confident that you will have a better experience by lowering the installation time and dependencies we require. This comes by the fact that we have started to use mono repositories. We saw early that a lot of users were not happy with the fact that they need to install webpack and webpack-cli in addition to hurting time and performance(CLI wise).
Version 3 of webpack-cli will not affect users using webpack as a stand-alone tool, but utilities around it. In specific, if you use scaffolding or migration features, we require you to install each feature as a stand-alone package. It will look exactly as before, but you will have to install the feature when using it:
$ npm install --save-dev @webpack-cli/migrate
$ webpack migrate webpack.config.js
Changes done to webpack-addons
Webpack-addons (utility library for creating a scaffold) will be renamed to webpack-scaffold and moved to the mono repository. We figured out that the name was not descriptive enough. In addition to that, we are working on a way for you to search existing scaffolds at our documentation page, how to write your own scaffold(in depth) and how to make the most out of it.
As a library author(not bound to creating scaffolds), you will now have direct access to every generator we have, how we transform and prompt for configurations.
As a part of our goal to create a viable ecosystem and users need, we have abstracted generators and AST transformations for you to use programatically. In the length, we hope that this results in a positive impact and that people will have a better time when getting started with webpack.
How will this affect me?
It does not affect any users. No migration is needed for webpack. This version has breaking changes, but no changes is done to how you compile your webpack build. Even though it does not affect any builds, it affects the ecosystem around webpack. Rename webpack-addons-myname to webpack-scaffold-myname and you are set. To use scaffolding or additional features install them as dependencies first and you are good.
The result of all this, is faster installation times, less dependencies in your node_modules and a way for library authors to make use of our source code to build webpack-based tools.
To try out the newest version (keep in mind this is work in progress), you can do:
$ npm install --save-dev webpack-cli@next
old package size: 66.3 kB
new package size: 18.1 kB
We’d love to see some benchmarks!
We’re constantly working on improving webpack, a piece of that is the CLI. The CLI is soon entering what I would like to call “maintenance” mode, where we will shift the focus towards fixing bugs, minimizing features, improving user interface and writing more detailed documentation. I’d like to thank all contributors for being involved in releasing this version, you are awesome!
We are always looking for more contributors, if you want to help out, have problems or anything else, please reach out to us!