The official CLI of webpack
- Getting Started
- webpack CLI Scaffolds
- Contributing and Internal Documentation
webpack CLI is a CLI tool for providing a flexible set of commands for developers to increase speed when setting up a custom webpack project. As of webpack v4, webpack is not expecting a configuration file but often, developers want to create a more custom webpack configuration based on their use-cases and needs. Exactly all these cases with webpack CLI we are providing a set of tools to improve the setup of custom webpack configuration.
How to install
When you have followed the Getting Started guide of webpack then webpack CLI is already installed!
npm install --save-dev webpack-cli or
yarn add webpack-cli --dev will install it.
Supporting developers is an important task for webpack CLI. Thus, webpack CLI provides different commands for many common tasks. We organize webpack CLI as a multi-package repository. Every command has a dedicated subfolder in the
When you have followed the Getting Started guide of webpack then webpack CLI is already installed! Otherwise, you would need to install webpack CLI and the packages you want to use. If we want to use the
init functionality to create a new
webpack.config.js configuration file:
npm i webpack-cli @webpack-cli/initnpx webpack-cli init
You will answer many questions when running the
init so webpack CLI can provide the best fitting configuration.
webpack CLI Scaffolds
With v3 of webpack CLI, we introduced scaffolding as an integral part of the CLI. Our goal is to simplify the creation of webpack configurations for different purposes. Additionally, sharing such solutions with the community is beneficial and with webpack Addon's we want to allow this. We provide
webpack-scaffold as a utility suite for creating these add-ons. It contains functions that could be of use for creating an addon yourself.
Contributing and Internal Documentation
The webpack family welcomes any contributor, small or big. We are happy to elaborate, guide you through the source code and find issues you might want to work on! To get started have a look at our documentation on contributing.