{ "manifest": { "name": "webpack-cli", "version": "4.10.0", "description": "CLI for webpack & friends", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/webpack/webpack-cli.git" }, "homepage": "https://github.com/webpack/webpack-cli/tree/master/packages/webpack-cli", "bugs": { "url": "https://github.com/webpack/webpack-cli/issues" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "bin": { "webpack-cli": "bin/cli.js" }, "main": "./lib/index.js", "engines": { "node": ">=10.13.0" }, "keywords": [ "webpack", "cli", "scaffolding", "module", "bundler", "web" ], "files": [ "bin", "lib", "!**/*__tests__" ], "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^1.2.0", "@webpack-cli/info": "^1.5.0", "@webpack-cli/serve": "^1.7.0", "colorette": "^2.0.14", "commander": "^7.0.0", "cross-spawn": "^7.0.3", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", "interpret": "^2.2.0", "rechoir": "^0.7.0", "webpack-merge": "^5.7.3" }, "peerDependencies": { "webpack": "4.x.x || 5.x.x" }, "peerDependenciesMeta": { "@webpack-cli/generators": { "optional": true }, "@webpack-cli/migrate": { "optional": true }, "webpack-bundle-analyzer": { "optional": true }, "webpack-dev-server": { "optional": true } }, "gitHead": "20882d463450d010bb76e0824fe555e9785e9561", "_registry": "npm", "_loc": "/home/josie/.cache/yarn/v6/npm-webpack-cli-4.10.0-37c1d69c8d85214c5a65e589378f53aec64dab31-integrity/node_modules/webpack-cli/package.json", "readmeFilename": "README.md", "readme": "
\n \n \n \n
\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 init|create|new|c|n [generation-path] [options] Initialize a new webpack project.\n loader|l [output-path] [options] Scaffold a loader.\n migrate|m [new-config-path] Migrate a configuration to a new version.\n plugin|p [output-path] [options] Scaffold a plugin.\n serve|server|s [entries...] [options] Run the webpack dev server.\n version|v [commands...] 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### webpack 4\n\n```\n Options:\n --analyze It invokes webpack-bundle-analyzer plugin to get bundle information\n -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js.\n --config-name Name of the configuration to use.\n -m, --merge Merge two or more configurations using 'webpack-merge'.\n --env Environment passed to the configuration when it is a function.\n --node-env Sets process.env.NODE_ENV to the specified value.\n --progress [value] Print compilation progress during build.\n -j, --json [value] Prints result as JSON or store it in a file.\n -d, --devtool Determine source maps to use.\n --no-devtool Do not generate source maps.\n --entry The entry point(s) of your application e.g. ./src/main.js.\n -h, --hot [value] Enables Hot Module Replacement\n --no-hot Disables Hot Module Replacement\n --mode Defines the mode to pass to webpack.\n --name Name of the configuration. Used when loading multiple configurations.\n -o, --output-path Output location of the file generated by webpack e.g. ./dist/.\n --prefetch Prefetch this request\n --stats [value] It instructs webpack on how to treat the stats e.g. verbose.\n --no-stats Disable stats output.\n -t, --target Sets the build target e.g. node.\n -w, --watch Watch for files changes.\n --no-watch Do not watch for file changes.\n --watch-options-stdin Stop watching when stdin stream has ended.\n --no-watch-options-stdin Do not stop watching when stdin stream has ended.\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\n### webpack 5\n\nCheckout [`OPTIONS.md`](https://github.com/webpack/webpack-cli/blob/master/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", "licenseText": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." }, "artifacts": [], "remote": { "resolved": "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz#37c1d69c8d85214c5a65e589378f53aec64dab31", "type": "tarball", "reference": "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz", "hash": "37c1d69c8d85214c5a65e589378f53aec64dab31", "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "registry": "npm", "packageName": "webpack-cli", "cacheIntegrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w== sha1-N8HWnI2FIUxaZeWJN49TrsZNqzE=" }, "registry": "npm", "hash": "37c1d69c8d85214c5a65e589378f53aec64dab31" }