{"name":"webpack-cli","version":"7.2.0","keywords":["webpack","cli","scaffolding","module","bundler","web"],"license":"MIT","_id":"webpack-cli@7.2.0","maintainers":[{"name":"evilebottnawi","email":"sheo13666q@gmail.com"},{"name":"15000621931","email":"784487301@qq.com"},{"name":"ev1stensberg","email":"evenstensberg@gmail.com"},{"name":"__hai","email":"haijie0619@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"avivkeller","email":"me@aviv.sh"}],"homepage":"https://github.com/webpack/webpack-cli/tree/main/packages/webpack-cli","bugs":{"url":"https://github.com/webpack/webpack-cli/issues"},"bin":{"webpack-cli":"bin/cli.js"},"dist":{"shasum":"02d3e7946b44266a8da7a2cb47053d5db60bc75d","tarball":"http://registry-npm.ywwl.com/webpack-cli/download/webpack-cli-7.2.0.tgz","fileCount":9,"integrity":"sha512-OfgnduZk4Cf9MzdtB6vBabAEF/LPANaev6GvOpCUfKy3EMJhuGk51T/d4i8klYzwksVKcAxN3EanL4Kdr7S8Yg==","signatures":[{"sig":"MEQCIEfpKpPOOVMAmHUnGhiHW6dhSnKfZIx9STGVrRx2pI4CAiANSheeSMsZJePE9HQPVaRU61U5G4bJklqa9NUKWpGQdQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/webpack-cli@7.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":138639,"size":32179,"noattachment":false,"key":"/webpack-cli/-/webpack-cli-7.2.0.tgz"},"main":"./lib/index.js","types":"./lib/index.d.ts","engines":{"node":">=20.9.0"},"funding":{"url":"https://opencollective.com/webpack","type":"opencollective"},"gitHead":"fb50f766851f500ca12867a2aa9de81fa6e368f9","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d7d1c3f5-3dea-4b97-a69f-da274e7d24cd"}},"repository":{"url":"git+https://github.com/webpack/webpack-cli.git","type":"git"},"_npmVersion":"11.16.0","description":"CLI for webpack & friends","directories":{},"_nodeVersion":"24.18.0","dependencies":{"envinfo":"^7.21.0","rechoir":"^0.8.0","commander":"^14.0.3","interpret":"^3.1.1","cross-spawn":"^7.0.6","import-local":"^3.2.0","webpack-merge":"^6.0.1","@discoveryjs/json-ext":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/envinfo":"^7.8.4"},"peerDependencies":{"toml":"^3.0.0 || ^4.0.0","json5":"^2.2.3","js-yaml":"^4.0.0 || ^5.0.0","webpack":"^5.101.0","webpack-dev-server":"^5.0.0 || ^6.0.0","webpack-bundle-analyzer":"^4.0.0 || ^5.0.0"},"peerDependenciesMeta":{"toml":{"optional":true},"json5":{"optional":true},"js-yaml":{"optional":true},"webpack-dev-server":{"optional":true},"webpack-bundle-analyzer":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/webpack-cli_7.2.0_1783186281230_0.8170129451085735","host":"s3://npm-registry-packages-npm-production"},"readme":"<div align=\"center\">\n    <a href=\"https://github.com/webpack/webpack-cli\">\n        <img width=\"200\" height=\"200\" src=\"https://webpack.js.org/assets/icon-square-big.svg\">\n    </a>\n</div>\n\n# webpack CLI\n\nThe official CLI of webpack\n\n## About\n\nwebpack CLI provides 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. webpack CLI addresses these needs by providing a set of tools to improve the setup of custom webpack configuration.\n\n## How to install\n\nWhen you have followed the [Getting Started](https://webpack.js.org/guides/getting-started/) guide of webpack then webpack CLI is already installed!\n\nOtherwise\n\n```bash\nnpm install --save-dev webpack-cli\n```\n\nor\n\n```bash\nyarn add webpack-cli --dev\n```\n\n## Supported arguments and commands\n\n### Usage\n\nAll interactions with webpack-cli are of the form\n\n```bash\nnpx webpack-cli [command] [options]\n```\n\nIf no command is specified then `bundle` command is used by default\n\n### Help Usage\n\nTo display basic commands and arguments -\n\n```bash\nnpx webpack-cli --help\n```\n\nTo display all supported commands and arguments -\n\n```bash\nnpx webpack-cli --help=verbose\n```\n\nor\n\n```bash\nnpx webpack-cli --help verbose\n```\n\n### Available Commands\n\n```\n  build|bundle|b [entries...] [options]  Run webpack (default command, can be omitted).\n  configtest|t [config-path]             Validate a webpack configuration.\n  help|h [command] [option]              Display help for commands and options.\n  info|i [options]                       Outputs information about your system.\n  serve|server|s [entries...] [options]  Run the webpack dev server and watch for source file changes while serving.\n  version|v [options]                    Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.\n  watch|w [entries...] [options]         Run webpack and watch for files changes.\n```\n\n### Available Options\n\n```\nOptions:\n  -c, --config <pathToConfigFile...>     Provide path to one or more webpack configuration files to process, e.g. \"./webpack.config.js\".\n  --config-name <name...>                Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations.\n  -m, --merge                            Merge two or more configurations using 'webpack-merge'.\n  --disable-interpret                    Disable interpret for loading the config file.\n  --env <value...>                       Environment variables passed to the configuration when it is a function, e.g. \"myvar\" or \"myvar=myval\".\n  --config-node-env <value>              Sets process.env.NODE_ENV to the specified value for access within the configuration.\n  --analyze                              It invokes webpack-bundle-analyzer plugin to get bundle information.\n  --progress [value]                     Print compilation progress during build.\n  -j, --json [pathToJsonFile]            Prints result as JSON or store it in a file.\n  --fail-on-warnings                     Stop webpack-cli process with non-zero exit code on warnings from webpack.\n  -d, --devtool <value>                  A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).\n  --no-devtool                           Negative 'devtool' option.\n  --entry <value...>                     A module that is loaded upon startup. Only the last one is exported.\n  -e, --extends <value...>               Path to the configuration to be extended (only works when using webpack-cli).\n  --mode <value>                         Enable production optimizations or development hints.\n  --name <value>                         Name of the configuration. Used when loading multiple configurations.\n  -o, --output-path <value>              The output directory as **absolute path** (required).\n  --stats [value]                        Stats options object or preset name.\n  --no-stats                             Negative 'stats' option.\n  -t, --target <value...>                Environment to build for. Environment to build for. An array of environments to build for all of them when possible.\n  --no-target                            Negative 'target' option.\n  -w, --watch                            Enter watch mode, which rebuilds on file change.\n  --no-watch                             Negative 'watch' option.\n  --watch-options-stdin                  Stop watching when stdin stream has ended.\n  --no-watch-options-stdin               Negative 'watch-options-stdin' option.\n\nGlobal options:\n  --color                                Enable colors on console.\n  --no-color                             Disable colors on console.\n  -v, --version                          Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.\n  -h, --help [verbose]                   Display help for commands and options.\n```\n\nCheckout [`OPTIONS.md`](https://github.com/webpack/webpack-cli/blob/main/OPTIONS.md) to see list of all available options.\n\n## Exit codes and their meanings\n\n| Exit Code | Description                                        |\n| --------- | -------------------------------------------------- |\n| `0`       | Success                                            |\n| `1`       | Errors from webpack                                |\n| `2`       | Configuration/options problem or an internal error |\n\n## CLI Environment Variables\n\n| Environment Variable                | Description                                                         |\n| ----------------------------------- | ------------------------------------------------------------------- |\n| `WEBPACK_CLI_SKIP_IMPORT_LOCAL`     | when `true` it will skip using the local instance of `webpack-cli`. |\n| `WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG` | when `true` it will force load the ESM config.                      |\n| `WEBPACK_PACKAGE`                   | Use a custom webpack version in CLI.                                |\n| `WEBPACK_DEV_SERVER_PACKAGE`        | Use a custom webpack-dev-server version in CLI.                     |\n| `WEBPACK_CLI_HELP_WIDTH`            | Use custom width for help output.                                   |\n\n## Configuration Environment Variables\n\nYou can use the following environment variables inside your webpack configuration:\n\n| Environment Variable | Description                                  |\n| -------------------- | -------------------------------------------- |\n| `WEBPACK_SERVE`      | `true` if `serve\\|s` is being used.          |\n| `WEBPACK_BUILD`      | `true` if `build\\|bundle\\|b` is being used.  |\n| `WEBPACK_WATCH`      | `true` if `--watch\\|watch\\|w` is being used. |\n\nCheckout [webpack.js.org](https://webpack.js.org/api/cli/) for more detailed documentation of `webpack-cli`.\n","publish_time":1783186281384,"_cnpm_publish_time":1783186281384,"dist-tags":{"4.0.0.0-alpha-5":"4.0.0-alpha-5","beta":"4.0.0-beta.9","latest":"7.3.1","next":"4.0.0-rc.1"}}