Every now and then we hear people make jokes about configuration being hard. It’s true, and webpack hasn’t been the most trivial tool to use when getting into web development.
That’s why we are changing the interface and webpack. When doing this, we are making the CLI of webpack better to look at, simpler to use and easier for users to understand.
With this goal in mind, we are confident that users will spend less time setting up the tool itself, to spending more time doing the fun part, actually developing the application. We do not want users to give up on web development once encountering webpack, rather we want to encourage people to have less configuration when starting and then making more advanced builds as they develop a traditional web application.
One of the best search results from google had the word “beginners guide” in it, which indicates that we have made a bad job at making the CLI of webpack easy to use.
We are sorry…
Ives Van Hoorne, the creator of CodeSandBox made this great illustration of how development feels like. It makes sense, because we want the user to use less time figuring out how things work to have more time developing an application. As webpack itself is a tool that is flexible, we do not need to make a web application perfect at once, but rather over time and by setting good default values for users.
Webpack-CLI will try to set the best defaults for you, meaning that we will optimize your build as much as we can, making it easier for you to have a fast application with no configuration. We are also making it easier for users to start different kinds of configurations such as React, SAAS or similar. This will allow you as a user to run webpack-cli without having to specify anything. The good stuff.
In the newest version of webpack-cli, we will remove a lot of specific flags that we think is too advanced to be in the CLI. We encourage users to write specific logic for their builds through a webpack configuration rather than writing a one-liner with 1337 characters.
The result of this is that the new CLI will be cleaner, provide more clarity to new users, the output will (finally) be more prettier, less rubbish in the output of a compilation and we will set good defaults.
Good defaults in this case would be that you will have performance optimizations out of the box, loading styles, files are easier based on your current project structure as well as development and production flags will be improved.
We will add a few new flags to make debugging and developing in watch mode easier, webpack-ui is going to be released later in v4, a merge flag to merge two configurations together will be added and finally, node flags are going to be supported.
Webpack-UI will be released along with a command/flag named webpack interactive. These two flags are targeted for helping new users understand webpack in a graphical way, to debug webpack interactively and provider a more convenient platform to run webpack from rather than from the Command Line Interface.
The changes are coming in the upcoming webpack-cli version, version 4.0.0 and it will be released in alpha by the end of December. We will release the CLI in a slow matter, to ensure that people reliant on the old CLI flag, will have backwards compatibility. A more detailed post along with proper documentation of how to migrate your application will be published soon as we release the alpha version for you to test and experiment with.