Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork645
Webpack's Command Line Interface
License
webpack/webpack-cli
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The official Command Line Interface of webpack
- Introduction
- Supported arguments and commands
- Packages
- Getting started
- Exit codes and their meanings
- Contributing and Internal Documentation
- Funding
Webpack CLI provides the interface of options webpack uses in its configuration file. The CLI options override options passed in the configuration file.
The CLI provides a rich set of commands that helps you develop your application faster.
If you have followed theGetting Started guide of webpack then webpack CLI is already installed!
Otherwisenpm install --save-dev webpack-cli,yarn add webpack-cli --dev orpnpm add --D webpack-cli will install it.
Get to know what are the available commands and argumentshere.
We organize webpack CLI as a multi-package repository usinglerna. The main CLI logic using options, resides inpackages/webpack-cli, while commands supported by the CLI, has dedicated subfolders in the folderpackages.
A summary of supported commands is described below.
Supporting developers is an important task for webpack CLI.Thus, webpack CLI provides different commands for many common tasks.
build|bundle|b [entries...] [options]- Run webpack (default command, can be omitted).configtest|t [config-path]- Validate a webpack configuration.help|h [command] [option]- Display help for commands and options.info|i [options]- Returns information related to the local environment.serve|server|s [entries...] [options]- Use webpack with a development server that provides live reloading.version|v [commands...]- Output the version number ofwebpack,webpack-cli,webpack-dev-server, and commands.watch|w [entries...] [options]- Run webpack and watch for files changes.
If you have followed theGetting 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 you want to create a fresh webpack project run the command as stated below:
npx create-webpack-app init
You will then be prompted for some questions about which features you want to use, such asscss,typescript,PWA support or other features.
| Exit Code | Description |
|---|---|
0 | Success |
1 | Errors from webpack |
2 | Configuration/options problem or an internal error |
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 ourcontribution documentation.
If you likewebpack, please consider donating throughOpen Collective to help us keep the project relevant.
Guidelines to how the webpack organization expects you to behave is documented underCode of Conduct
About
Webpack's Command Line Interface
Topics
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.