webpack-cli
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
@discoveryjs/json-ext | 0.5.7 | 17.96 kB | MIT | prod | |
@webpack-cli/configtest | 2.1.1 | 2.01 kB | MIT | prod | 1 1 |
@webpack-cli/info | 2.0.2 | 1.92 kB | MIT | prod | 1 1 |
@webpack-cli/serve | 2.0.5 | 3.6 kB | MIT | prod | 1 1 |
colorette | 2.0.20 | 4.94 kB | MIT | prod | |
commander | 10.0.1 | 43.87 kB | MIT | prod | |
cross-spawn | 7.0.3 | 7.3 kB | MIT | prod | |
envinfo | 7.13.0 | 157.92 kB | MIT | prod | |
fastest-levenshtein | 1.0.16 | 5.96 kB | MIT | prod | |
import-local | 3.1.0 | 2.34 kB | MIT | prod | |
interpret | 3.1.1 | 4.75 kB | MIT | prod | |
rechoir | 0.8.0 | 3.73 kB | MIT | prod | |
webpack-merge | 5.10.0 | 12.26 kB | MIT | prod | |
webpack | 5.91.0 | 4.71 MB | MIT | prod peer | 1 1 |
Webpack-CLI is the official command line interface for Webpack. It provides a flexible set of commands for developers to enhance speed when setting up a custom Webpack project. Webpack on its own doesn't expect a configuration file. However, developers often need to create custom configurations based on their use-cases and needs. Webpack-CLI addresses these needs by offering a set of tools to improve the setup of custom Webpack configuration.
To use Webpack-CLI, you will first need to install it. You can do this either with npm or with yarn. Here's how to install Webpack-CLI with npm:
npm install --save-dev webpack-cli
And with yarn:
yarn add webpack-cli --dev
Once installed, you can start using Webpack-CLI from your terminal. The basic structure of commands is npx webpack-cli [command] [options]
. If no command is specified then bundle
command is used by default. For example, to bundle your project you would run:
npx webpack-cli bundle
Webpack-CLI has many more commands and options available for use. Some of these include build
, configtest
, help
, info
, init
, loader
, plugin
, serve
, version
, and watch
. You can use the --help
option to get more information on these commands and features.
The comprehensive documentation for Webpack-CLI can be found on the official Webpack website at https://webpack.js.org/api/cli/. In addition to the basics and how to use each command, the documentation also covers environment variables, exit codes, and a wide range of available options. With Webpack-CLI being such a substantial tool, you're encouraged to dive into the docs to maximize your use of it.