From f4686141681cfcbc74d57e69a732e176decff225 Mon Sep 17 00:00:00 2001 From: Axel D Date: Thu, 18 May 2023 19:44:53 +0200 Subject: [PATCH] fix: improve help for some flags --- .cspell.json | 26 +- .gitattributes | 3 +- OPTIONS.md | 10 +- SERVE-OPTIONS-v4.md | 12 +- packages/serve/src/index.ts | 2 +- packages/webpack-cli/src/types.ts | 3 +- packages/webpack-cli/src/webpack-cli.ts | 22 +- .../help.test.js.snap.devServer4.webpack5 | 936 +++++++++--------- 8 files changed, 532 insertions(+), 482 deletions(-) diff --git a/.cspell.json b/.cspell.json index ee2bee7f736..0e1a2be1f25 100644 --- a/.cspell.json +++ b/.cspell.json @@ -17,6 +17,7 @@ "configjs", "configtest", "CRLs", + "dbaeumer", "deserialization", "discoveryjs", "dotfolder", @@ -24,6 +25,8 @@ "entrypoints", "envinfo", "Eren", + "esbenp", + "eslintcache", "execa", "Fira", "gitter", @@ -31,8 +34,8 @@ "Hisoka", "Hoshiumi", "Ichigo", - "IIFE's", "iife", + "IIFE's", "Itadori", "Iwaizumi", "Jotaro", @@ -45,13 +48,19 @@ "loglevel", "Luffy", "mergeable", + "mfirst", "Miyuki", "Mizuhara", + "msecond", + "msuccessfully", "multicompiler", "multipleq", + "myvar", + "myval", "Naruto", "Neue", "Nishinoya", + "Nitin", "nwjs", "Oikawa", "pathinfo", @@ -67,9 +76,11 @@ "Satoru", "Segoe", "Shoyo", + "smoketest", "smoketests", "sockjs", "somefile", + "sourcemaps", "SPDY", "splitted", "Statsv", @@ -82,23 +93,14 @@ "Tobio", "tsbuildinfo", "typeahead", + "wagoid", "webassembly", "webpackfile", "Yukihira", "Yukii", "Yuuji", "Zangetsu", - "Zenitsu", - "eslintcache", - "wagoid", - "Nitin", - "smoketest", - "dbaeumer", - "esbenp", - "msuccessfully", - "mfirst", - "msecond", - "sourcemaps" + "Zenitsu" ], "dictionaries": ["npm", "software-terms"], "ignorePaths": [ diff --git a/.gitattributes b/.gitattributes index 1632a73dd4c..07764a78d98 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ -*.js text eol=lf -*.ts text eol=lf +* text eol=lf \ No newline at end of file diff --git a/OPTIONS.md b/OPTIONS.md index ef31666326f..a638429def9 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -5,16 +5,16 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. -m, --merge Merge two or more configurations using 'webpack-merge'. --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". --node-env Sets process.env.NODE_ENV to the specified value. --define-process-env-node-env Sets process.env.NODE_ENV to the specified value. (Currently an alias for `--node-env`). --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. -e, --extends Path to the configuration to be extended (only works when using webpack-cli). --no-amd Negative 'amd' option. @@ -1015,7 +1015,7 @@ Commands: init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server and watch for source file changes while serving. version|v [options] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. diff --git a/SERVE-OPTIONS-v4.md b/SERVE-OPTIONS-v4.md index 609b1ae0090..100364c7451 100644 --- a/SERVE-OPTIONS-v4.md +++ b/SERVE-OPTIONS-v4.md @@ -1,18 +1,18 @@ ``` Usage: webpack serve|server|s [entries...] [options] -Run the webpack dev server. +Run the webpack dev server and watch for source file changes while serving. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. -m, --merge Merge two or more configurations using 'webpack-merge'. --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". --node-env Sets process.env.NODE_ENV to the specified value. --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. -e, --extends Path to the configuration to be extended (only works when using webpack-cli). -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). @@ -26,6 +26,8 @@ Options: --no-stats Negative 'stats' option. -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. --no-target Negative 'target' option. + -w, --watch Enter watch mode, which rebuilds on file change. + --no-watch Negative 'watch' option. --watch-options-stdin Stop watching when stdin stream has ended. --no-watch-options-stdin Negative 'watch-options-stdin' option. --allowed-hosts Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto'). diff --git a/packages/serve/src/index.ts b/packages/serve/src/index.ts index 3770144b57b..445ffdfbf41 100644 --- a/packages/serve/src/index.ts +++ b/packages/serve/src/index.ts @@ -28,7 +28,7 @@ class ServeCommand { { name: "serve [entries...]", alias: ["server", "s"], - description: "Run the webpack dev server.", + description: "Run the webpack dev server and watch for source file changes while serving.", usage: "[entries...] [options]", pkg: "@webpack-cli/serve", dependencies: [WEBPACK_PACKAGE, WEBPACK_DEV_SERVER_PACKAGE], diff --git a/packages/webpack-cli/src/types.ts b/packages/webpack-cli/src/types.ts index a2aebc5c872..af34ae8ce1c 100644 --- a/packages/webpack-cli/src/types.ts +++ b/packages/webpack-cli/src/types.ts @@ -109,7 +109,7 @@ interface WebpackCLIStats extends Stats { type WebpackCLIMainOption = Pick< WebpackCLIBuiltInOption, - "description" | "defaultValue" | "multiple" + "valueName" | "description" | "defaultValue" | "multiple" > & { flags: string; type: Set; @@ -139,6 +139,7 @@ interface WebpackCLIBuiltInFlag { configs?: Partial[]; negative?: boolean; multiple?: boolean; + valueName?: string; description: string; describe?: string; negatedDescription?: string; diff --git a/packages/webpack-cli/src/webpack-cli.ts b/packages/webpack-cli/src/webpack-cli.ts index 72f8a515b86..6d190e65ad8 100644 --- a/packages/webpack-cli/src/webpack-cli.ts +++ b/packages/webpack-cli/src/webpack-cli.ts @@ -638,6 +638,7 @@ class WebpackCLI implements IWebpackCLI { mainOption = { flags: option.alias ? `-${option.alias}, --${option.name}` : `--${option.name}`, + valueName: option.valueName || "value", description: option.description || "", type: mainOptionType, multiple: option.multiple, @@ -654,6 +655,7 @@ class WebpackCLI implements IWebpackCLI { } else { mainOption = { flags: option.alias ? `-${option.alias}, --${option.name}` : `--${option.name}`, + valueName: option.valueName || "value", description: option.description || "", type: option.type ? new Set(Array.isArray(option.type) ? option.type : [option.type]) @@ -673,9 +675,13 @@ class WebpackCLI implements IWebpackCLI { } if (mainOption.type.size > 1 && mainOption.type.has(Boolean)) { - mainOption.flags = `${mainOption.flags} [value${mainOption.multiple ? "..." : ""}]`; + mainOption.flags = `${mainOption.flags} [${mainOption.valueName || "value"}${ + mainOption.multiple ? "..." : "" + }]`; } else if (mainOption.type.size > 0 && !mainOption.type.has(Boolean)) { - mainOption.flags = `${mainOption.flags} `; + mainOption.flags = `${mainOption.flags} <${mainOption.valueName || "value"}${ + mainOption.multiple ? "..." : "" + }>`; } if (mainOption.type.size === 1) { @@ -808,7 +814,9 @@ class WebpackCLI implements IWebpackCLI { }, ], multiple: true, - description: "Provide path to a webpack configuration file e.g. ./webpack.config.js.", + valueName: "pathToConfigFile", + description: + 'Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js".', helpLevel: "minimum", }, { @@ -819,7 +827,9 @@ class WebpackCLI implements IWebpackCLI { }, ], multiple: true, - description: "Name of the configuration to use.", + valueName: "name", + description: + "Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations.", helpLevel: "minimum", }, { @@ -890,7 +900,8 @@ class WebpackCLI implements IWebpackCLI { return previous; }, multiple: true, - description: "Environment passed to the configuration when it is a function.", + description: + 'Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval".', helpLevel: "minimum", }, { @@ -958,6 +969,7 @@ class WebpackCLI implements IWebpackCLI { }, ], alias: "j", + valueName: "pathToJsonFile", description: "Prints result as JSON or store it in a file.", helpLevel: "minimum", }, diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 index ab8413515a6..af6dbd3a74c 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 @@ -94,15 +94,15 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. -m, --merge Merge two or more configurations using 'webpack-merge'. --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". --node-env Sets process.env.NODE_ENV to the specified value. --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. -e, --extends Path to the configuration to be extended (only works when using webpack-cli). -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). @@ -135,7 +135,7 @@ Commands: init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server and watch for source file changes while serving. version|v [options] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -155,15 +155,15 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. -m, --merge Merge two or more configurations using 'webpack-merge'. --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". --node-env Sets process.env.NODE_ENV to the specified value. --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. -e, --extends Path to the configuration to be extended (only works when using webpack-cli). -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). @@ -196,7 +196,7 @@ Commands: init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server and watch for source file changes while serving. version|v [options] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -216,15 +216,15 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. -m, --merge Merge two or more configurations using 'webpack-merge'. --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". --node-env Sets process.env.NODE_ENV to the specified value. --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. -e, --extends Path to the configuration to be extended (only works when using webpack-cli). -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). @@ -257,7 +257,7 @@ Commands: init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server and watch for source file changes while serving. version|v [options] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -276,38 +276,38 @@ exports[`help should show help information for 'b' command using command syntax: Run webpack (default command, can be omitted). Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. - -e, --extends Path to the configuration to be extended (only works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). - --mode Enable production optimizations or development hints. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path The output directory as **absolute path** (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. - --no-target Negative 'target' option. - -w, --watch Enter watch mode, which rebuilds on file change. - --no-watch Negative 'watch' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret for loading the config file. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the specified value. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. + --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. Only the last one is exported. + --extends Path to the configuration to be extended (only works when using webpack-cli). + --mode Enable production optimizations or development hints. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path The output directory as **absolute path** (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. + --no-target Negative 'target' option. + -w, --watch Enter watch mode, which rebuilds on file change. + --no-watch Negative 'watch' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -324,38 +324,38 @@ exports[`help should show help information for 'b' command using the "--help" op Run webpack (default command, can be omitted). Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. - -e, --extends Path to the configuration to be extended (only works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). - --mode Enable production optimizations or development hints. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path The output directory as **absolute path** (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. - --no-target Negative 'target' option. - -w, --watch Enter watch mode, which rebuilds on file change. - --no-watch Negative 'watch' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret for loading the config file. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the specified value. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. + --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. Only the last one is exported. + --extends Path to the configuration to be extended (only works when using webpack-cli). + --mode Enable production optimizations or development hints. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path The output directory as **absolute path** (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. + --no-target Negative 'target' option. + -w, --watch Enter watch mode, which rebuilds on file change. + --no-watch Negative 'watch' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -372,55 +372,64 @@ exports[`help should show help information for 'build' and respect the "--color" Run webpack (default command, can be omitted). Options: - -c, --config Provide path to a webpack configuration file e.g. - ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using - 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is - a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get - bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code - on warnings from webpack. - -e, --extends Path to the configuration to be extended (only - works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | - eval | - [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the - last one is exported. - --extends Path to the configuration to be extended (only - works when using webpack-cli). - --mode Enable production optimizations or development - hints. - --name Name of the configuration. Used when loading - multiple configurations. - -o, --output-path The output directory as **absolute path** - (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build - for. An array of environments to build for all of - them when possible. - --no-target Negative 'target' option. - -w, --watch Enter watch mode, which rebuilds on file change. - --no-watch Negative 'watch' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack + configuration files to process, e.g. + "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to + use if configuration file exports an + array of multiple configurations. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --disable-interpret Disable interpret for loading the config + file. + --env Environment variables passed to the + configuration when it is a function, e.g. + "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the + specified value. + --analyze It invokes webpack-bundle-analyzer plugin + to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a + file. + --fail-on-warnings Stop webpack-cli process with non-zero + exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended + (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. + Only the last one is exported. + --extends Path to the configuration to be extended + (only works when using webpack-cli). + --mode Enable production optimizations or + development hints. + --name Name of the configuration. Used when + loading multiple configurations. + -o, --output-path The output directory as **absolute path** + (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to + build for. An array of environments to + build for all of them when possible. + --no-target Negative 'target' option. + -w, --watch Enter watch mode, which rebuilds on file + change. + --no-watch Negative 'watch' option. + --watch-options-stdin Stop watching when stdin stream has + ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', - 'webpack-cli' and 'webpack-dev-server' and - commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' + and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -437,55 +446,64 @@ exports[`help should show help information for 'build' and respect the "--no-col Run webpack (default command, can be omitted). Options: - -c, --config Provide path to a webpack configuration file e.g. - ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using - 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is - a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get - bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code - on warnings from webpack. - -e, --extends Path to the configuration to be extended (only - works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | - eval | - [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the - last one is exported. - --extends Path to the configuration to be extended (only - works when using webpack-cli). - --mode Enable production optimizations or development - hints. - --name Name of the configuration. Used when loading - multiple configurations. - -o, --output-path The output directory as **absolute path** - (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build - for. An array of environments to build for all of - them when possible. - --no-target Negative 'target' option. - -w, --watch Enter watch mode, which rebuilds on file change. - --no-watch Negative 'watch' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack + configuration files to process, e.g. + "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to + use if configuration file exports an + array of multiple configurations. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --disable-interpret Disable interpret for loading the config + file. + --env Environment variables passed to the + configuration when it is a function, e.g. + "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the + specified value. + --analyze It invokes webpack-bundle-analyzer plugin + to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a + file. + --fail-on-warnings Stop webpack-cli process with non-zero + exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended + (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. + Only the last one is exported. + --extends Path to the configuration to be extended + (only works when using webpack-cli). + --mode Enable production optimizations or + development hints. + --name Name of the configuration. Used when + loading multiple configurations. + -o, --output-path The output directory as **absolute path** + (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to + build for. An array of environments to + build for all of them when possible. + --no-target Negative 'target' option. + -w, --watch Enter watch mode, which rebuilds on file + change. + --no-watch Negative 'watch' option. + --watch-options-stdin Stop watching when stdin stream has + ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', - 'webpack-cli' and 'webpack-dev-server' and - commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' + and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -502,38 +520,38 @@ exports[`help should show help information for 'build' command using command syn Run webpack (default command, can be omitted). Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. - -e, --extends Path to the configuration to be extended (only works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). - --mode Enable production optimizations or development hints. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path The output directory as **absolute path** (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. - --no-target Negative 'target' option. - -w, --watch Enter watch mode, which rebuilds on file change. - --no-watch Negative 'watch' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret for loading the config file. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the specified value. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. + --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. Only the last one is exported. + --extends Path to the configuration to be extended (only works when using webpack-cli). + --mode Enable production optimizations or development hints. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path The output directory as **absolute path** (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. + --no-target Negative 'target' option. + -w, --watch Enter watch mode, which rebuilds on file change. + --no-watch Negative 'watch' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -550,38 +568,38 @@ exports[`help should show help information for 'build' command using the "--help Run webpack (default command, can be omitted). Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. - -e, --extends Path to the configuration to be extended (only works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). - --mode Enable production optimizations or development hints. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path The output directory as **absolute path** (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. - --no-target Negative 'target' option. - -w, --watch Enter watch mode, which rebuilds on file change. - --no-watch Negative 'watch' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret for loading the config file. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the specified value. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. + --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. Only the last one is exported. + --extends Path to the configuration to be extended (only works when using webpack-cli). + --mode Enable production optimizations or development hints. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path The output directory as **absolute path** (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. + --no-target Negative 'target' option. + -w, --watch Enter watch mode, which rebuilds on file change. + --no-watch Negative 'watch' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -1532,36 +1550,36 @@ exports[`help should show help information for 'w' command using command syntax: Run webpack and watch for files changes. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. - -e, --extends Path to the configuration to be extended (only works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). - --mode Enable production optimizations or development hints. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path The output directory as **absolute path** (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. - --no-target Negative 'target' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret for loading the config file. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the specified value. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. + --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. Only the last one is exported. + --extends Path to the configuration to be extended (only works when using webpack-cli). + --mode Enable production optimizations or development hints. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path The output directory as **absolute path** (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -1578,36 +1596,36 @@ exports[`help should show help information for 'w' command using the "--help" op Run webpack and watch for files changes. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. - -e, --extends Path to the configuration to be extended (only works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). - --mode Enable production optimizations or development hints. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path The output directory as **absolute path** (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. - --no-target Negative 'target' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret for loading the config file. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the specified value. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. + --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. Only the last one is exported. + --extends Path to the configuration to be extended (only works when using webpack-cli). + --mode Enable production optimizations or development hints. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path The output directory as **absolute path** (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -1624,53 +1642,61 @@ exports[`help should show help information for 'watch' and respect the "--color" Run webpack and watch for files changes. Options: - -c, --config Provide path to a webpack configuration file e.g. - ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using - 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is - a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get - bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code - on warnings from webpack. - -e, --extends Path to the configuration to be extended (only - works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | - eval | - [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the - last one is exported. - --extends Path to the configuration to be extended (only - works when using webpack-cli). - --mode Enable production optimizations or development - hints. - --name Name of the configuration. Used when loading - multiple configurations. - -o, --output-path The output directory as **absolute path** - (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build - for. An array of environments to build for all of - them when possible. - --no-target Negative 'target' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack + configuration files to process, e.g. + "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to + use if configuration file exports an + array of multiple configurations. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --disable-interpret Disable interpret for loading the config + file. + --env Environment variables passed to the + configuration when it is a function, e.g. + "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the + specified value. + --analyze It invokes webpack-bundle-analyzer plugin + to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a + file. + --fail-on-warnings Stop webpack-cli process with non-zero + exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended + (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. + Only the last one is exported. + --extends Path to the configuration to be extended + (only works when using webpack-cli). + --mode Enable production optimizations or + development hints. + --name Name of the configuration. Used when + loading multiple configurations. + -o, --output-path The output directory as **absolute path** + (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to + build for. An array of environments to + build for all of them when possible. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has + ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', - 'webpack-cli' and 'webpack-dev-server' and - commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' + and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -1687,53 +1713,61 @@ exports[`help should show help information for 'watch' and respect the "--no-col Run webpack and watch for files changes. Options: - -c, --config Provide path to a webpack configuration file e.g. - ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using - 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is - a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get - bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code - on warnings from webpack. - -e, --extends Path to the configuration to be extended (only - works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | - eval | - [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the - last one is exported. - --extends Path to the configuration to be extended (only - works when using webpack-cli). - --mode Enable production optimizations or development - hints. - --name Name of the configuration. Used when loading - multiple configurations. - -o, --output-path The output directory as **absolute path** - (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build - for. An array of environments to build for all of - them when possible. - --no-target Negative 'target' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack + configuration files to process, e.g. + "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to + use if configuration file exports an + array of multiple configurations. + -m, --merge Merge two or more configurations using + 'webpack-merge'. + --disable-interpret Disable interpret for loading the config + file. + --env Environment variables passed to the + configuration when it is a function, e.g. + "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the + specified value. + --analyze It invokes webpack-bundle-analyzer plugin + to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a + file. + --fail-on-warnings Stop webpack-cli process with non-zero + exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended + (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. + Only the last one is exported. + --extends Path to the configuration to be extended + (only works when using webpack-cli). + --mode Enable production optimizations or + development hints. + --name Name of the configuration. Used when + loading multiple configurations. + -o, --output-path The output directory as **absolute path** + (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to + build for. An array of environments to + build for all of them when possible. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has + ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', - 'webpack-cli' and 'webpack-dev-server' and - commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', + 'webpack-cli' and 'webpack-dev-server' + and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -1750,36 +1784,36 @@ exports[`help should show help information for 'watch' command using command syn Run webpack and watch for files changes. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. - -e, --extends Path to the configuration to be extended (only works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). - --mode Enable production optimizations or development hints. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path The output directory as **absolute path** (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. - --no-target Negative 'target' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret for loading the config file. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the specified value. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. + --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. Only the last one is exported. + --extends Path to the configuration to be extended (only works when using webpack-cli). + --mode Enable production optimizations or development hints. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path The output directory as **absolute path** (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -1796,36 +1830,36 @@ exports[`help should show help information for 'watch' command using the "--help Run webpack and watch for files changes. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. - -m, --merge Merge two or more configurations using 'webpack-merge'. - --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. - --node-env Sets process.env.NODE_ENV to the specified value. - --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. - --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. - --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. - -e, --extends Path to the configuration to be extended (only works when using webpack-cli). - -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). - --no-devtool Negative 'devtool' option. - --entry A module that is loaded upon startup. Only the last one is exported. - --extends Path to the configuration to be extended (only works when using webpack-cli). - --mode Enable production optimizations or development hints. - --name Name of the configuration. Used when loading multiple configurations. - -o, --output-path The output directory as **absolute path** (required). - --stats [value] Stats options object or preset name. - --no-stats Negative 'stats' option. - -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. - --no-target Negative 'target' option. - --watch-options-stdin Stop watching when stdin stream has ended. - --no-watch-options-stdin Negative 'watch-options-stdin' option. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. + -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret for loading the config file. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". + --node-env Sets process.env.NODE_ENV to the specified value. + --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. + --progress [value] Print compilation progress during build. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. + --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. + -e, --extends Path to the configuration to be extended (only works when using webpack-cli). + -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). + --no-devtool Negative 'devtool' option. + --entry A module that is loaded upon startup. Only the last one is exported. + --extends Path to the configuration to be extended (only works when using webpack-cli). + --mode Enable production optimizations or development hints. + --name Name of the configuration. Used when loading multiple configurations. + -o, --output-path The output directory as **absolute path** (required). + --stats [value] Stats options object or preset name. + --no-stats Negative 'stats' option. + -t, --target Environment to build for. Environment to build for. An array of environments to build for all of them when possible. + --no-target Negative 'target' option. + --watch-options-stdin Stop watching when stdin stream has ended. + --no-watch-options-stdin Negative 'watch-options-stdin' option. Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. + --color Enable colors on console. + --no-color Disable colors on console. + -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. + -h, --help [verbose] Display help for commands and options. To see list of all supported commands and options run 'webpack --help=verbose'. @@ -1843,15 +1877,15 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. -m, --merge Merge two or more configurations using 'webpack-merge'. --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". --node-env Sets process.env.NODE_ENV to the specified value. --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. -e, --extends Path to the configuration to be extended (only works when using webpack-cli). -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). @@ -1884,7 +1918,7 @@ Commands: init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server and watch for source file changes while serving. version|v [options] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -1904,15 +1938,15 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. -m, --merge Merge two or more configurations using 'webpack-merge'. --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". --node-env Sets process.env.NODE_ENV to the specified value. --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. -e, --extends Path to the configuration to be extended (only works when using webpack-cli). -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). @@ -1945,7 +1979,7 @@ Commands: init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server and watch for source file changes while serving. version|v [options] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -2155,15 +2189,15 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. -m, --merge Merge two or more configurations using 'webpack-merge'. --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". --node-env Sets process.env.NODE_ENV to the specified value. --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. -e, --extends Path to the configuration to be extended (only works when using webpack-cli). -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). @@ -2196,7 +2230,7 @@ Commands: init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server and watch for source file changes while serving. version|v [options] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes. @@ -2214,15 +2248,15 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. - --config-name Name of the configuration to use. + -c, --config Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js". + --config-name Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations. -m, --merge Merge two or more configurations using 'webpack-merge'. --disable-interpret Disable interpret for loading the config file. - --env Environment passed to the configuration when it is a function. + --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". --node-env Sets process.env.NODE_ENV to the specified value. --analyze It invokes webpack-bundle-analyzer plugin to get bundle information. --progress [value] Print compilation progress during build. - -j, --json [value] Prints result as JSON or store it in a file. + -j, --json [pathToJsonFile] Prints result as JSON or store it in a file. --fail-on-warnings Stop webpack-cli process with non-zero exit code on warnings from webpack. -e, --extends Path to the configuration to be extended (only works when using webpack-cli). -d, --devtool A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map). @@ -2255,7 +2289,7 @@ Commands: init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. plugin|p [output-path] [options] Scaffold a plugin. - serve|server|s [entries...] [options] Run the webpack dev server. + serve|server|s [entries...] [options] Run the webpack dev server and watch for source file changes while serving. version|v [options] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. watch|w [entries...] [options] Run webpack and watch for files changes.