diff --git a/packages/webpack-cli/src/ui-renderer.ts b/packages/webpack-cli/src/ui-renderer.ts new file mode 100644 index 00000000000..6bf0f901977 --- /dev/null +++ b/packages/webpack-cli/src/ui-renderer.ts @@ -0,0 +1,392 @@ +/** + * webpack-cli UI renderer + * Fully decoupled from CLI logic + */ + +export interface Colors { + bold: (str: string) => string; + cyan: (str: string) => string; + blue: (str: string) => string; + yellow: (str: string) => string; + green: (str: string) => string; + red: (str: string) => string; +} + +export interface FooterOptions { + verbose?: boolean; +} + +export interface Row { + label: string; + value: string; + color?: (str: string) => string; +} + +export interface OptionHelpData { + optionName: string; + usage: string; + short?: string; + description?: string; + docUrl: string; + possibleValues?: string; +} + +export interface RenderOptions { + colors: Colors; + log: (line: string) => void; + columns: number; +} + +export interface AliasHelpData { + alias: string; + canonical: string; + optionHelp: OptionHelpData; +} + +export interface HelpOption { + /** e.g. "-c, --config " */ + flags: string; + description: string; +} + +export interface CommandHelpData { + /** e.g. "build", "serve", "info" */ + name: string; + /** e.g. "webpack build|bundle|b [entries...] [options]" */ + usage: string; + description: string; + options: HelpOption[]; + globalOptions: HelpOption[]; +} + +/** Passed to `renderCommandHeader` to describe the running command. */ +export interface CommandMeta { + name: string; + description: string; +} + +/** One section emitted by `renderInfoOutput`, e.g. "System" or "Binaries". */ +export interface InfoSection { + title: string; + rows: Row[]; +} + +// ─── Layout constants ───────────────────────────────────────────── +export const MAX_WIDTH = 80; +export const INDENT = 2; +export const COL_GAP = 2; +export const MIN_DIVIDER = 10; + +const indent = (n: number) => " ".repeat(n); + +function divider(width: number, colors: Colors): string { + const len = Math.max(MIN_DIVIDER, Math.min(width, MAX_WIDTH) - INDENT * 2 - 2); + return `${indent(INDENT)}${colors.blue("─".repeat(len))}`; +} + +function wrapValue(text: string, width: number): string[] { + if (text.length <= width) return [text]; + + const words = text.split(" "); + const lines: string[] = []; + let current = ""; + + for (const word of words) { + if (word.length > width) { + if (current) { + lines.push(current); + current = ""; + } + let remaining = word; + while (remaining.length > width) { + lines.push(remaining.slice(0, width)); + remaining = remaining.slice(width); + } + current = remaining; + continue; + } + if (current.length + (current ? 1 : 0) + word.length > width) { + if (current) lines.push(current); + current = word; + } else { + current = current ? `${current} ${word}` : word; + } + } + + if (current) lines.push(current); + return lines; +} + +export function renderRows( + rows: Row[], + colors: Colors, + log: (s: string) => void, + termWidth: number, +): void { + const labelWidth = Math.max(...rows.map((r) => r.label.length)); + const valueWidth = termWidth - INDENT - labelWidth - COL_GAP; + const continuation = indent(INDENT + labelWidth + COL_GAP); + + for (const { label, value, color } of rows) { + const lines = wrapValue(value, valueWidth); + const colorFn = color ?? ((str: string) => str); + log( + `${indent(INDENT)}${colors.bold(label.padEnd(labelWidth))}${indent(COL_GAP)}${colorFn(lines[0])}`, + ); + for (let i = 1; i < lines.length; i++) { + log(`${continuation}${colorFn(lines[i])}`); + } + } +} + +export function renderCommandHeader(meta: CommandMeta, opts: RenderOptions): void { + const { colors, log } = opts; + const termWidth = Math.min(opts.columns || MAX_WIDTH, MAX_WIDTH); + + log(""); + log(`${indent(INDENT)}${colors.bold(colors.cyan("⬡"))} ${colors.bold(`webpack ${meta.name}`)}`); + log(divider(termWidth, colors)); + + if (meta.description) { + const descWidth = termWidth - INDENT * 2; + for (const line of wrapValue(meta.description, descWidth)) { + log(`${indent(INDENT)}${line}`); + } + log(""); + } +} + +export function renderCommandFooter(opts: RenderOptions): void { + const termWidth = Math.min(opts.columns, MAX_WIDTH); + opts.log(divider(termWidth, opts.colors)); + opts.log(""); +} + +function _renderHelpOptions( + options: HelpOption[], + colors: Colors, + push: (line: string) => void, + termWidth: number, + flagsWidth: number, +): void { + const descWidth = termWidth - INDENT - flagsWidth - COL_GAP; + const continuation = indent(INDENT + flagsWidth + COL_GAP); + + for (const { flags, description } of options) { + const descLines = wrapValue(description || "", descWidth); + const flagsPadded = flags.padEnd(flagsWidth); + push(`${indent(INDENT)}${colors.cyan(flagsPadded)}${indent(COL_GAP)}${descLines[0] ?? ""}`); + for (let i = 1; i < descLines.length; i++) { + push(`${continuation}${descLines[i]}`); + } + } +} + +export function renderCommandHelp(data: CommandHelpData, opts: RenderOptions): void { + const { colors } = opts; + const termWidth = Math.min(opts.columns || MAX_WIDTH, MAX_WIDTH); + const div = divider(termWidth, colors); + + const lines: string[] = []; + const push = (line: string) => lines.push(line); + + push(""); + push(`${indent(INDENT)}${colors.bold(colors.cyan("⬡"))} ${colors.bold(`webpack ${data.name}`)}`); + push(div); + + const descWidth = termWidth - INDENT * 2; + for (const line of wrapValue(data.description, descWidth)) { + push(`${indent(INDENT)}${line}`); + } + + push(""); + const usageLabel = `${colors.bold("Usage:")} `; + const usageIndent = indent(INDENT + "Usage: ".length); + const usageWidth = termWidth - INDENT - "Usage: ".length; + const usageLines = wrapValue(data.usage, usageWidth); + push(`${indent(INDENT)}${usageLabel}${usageLines[0]}`); + for (let i = 1; i < usageLines.length; i++) push(`${usageIndent}${usageLines[i]}`); + + push(""); + + const allFlags = [...data.options, ...data.globalOptions].map((opt) => opt.flags.length); + const flagsWidth = Math.min(38, allFlags.length > 0 ? Math.max(...allFlags) + COL_GAP : 20); + + if (data.options.length > 0) { + push(`${indent(INDENT)}${colors.bold(colors.cyan("Options"))}`); + push(div); + _renderHelpOptions(data.options, colors, push, termWidth, flagsWidth); + push(""); + } + + if (data.globalOptions.length > 0) { + push(`${indent(INDENT)}${colors.bold(colors.cyan("Global options"))}`); + push(div); + _renderHelpOptions(data.globalOptions, colors, push, termWidth, flagsWidth); + push(""); + } + + push(div); + push(""); + + for (const line of lines) opts.log(line); +} + +export function renderOptionHelp(data: OptionHelpData, opts: RenderOptions): void { + const { colors, log } = opts; + const termWidth = Math.min(opts.columns, MAX_WIDTH); + + const rows: Row[] = [{ label: "Usage", value: data.usage, color: colors.green }]; + if (data.short) rows.push({ label: "Short", value: data.short, color: colors.green }); + if (data.description) rows.push({ label: "Description", value: data.description }); + rows.push({ label: "Documentation", value: data.docUrl, color: colors.cyan }); + if (data.possibleValues) { + rows.push({ label: "Possible values", value: data.possibleValues, color: colors.yellow }); + } + + const div = divider(termWidth, colors); + log(""); + log( + `${indent(INDENT)}${colors.bold(colors.cyan("⬡"))} ${colors.bold(colors.cyan(data.optionName))}`, + ); + log(div); + renderRows(rows, colors, log, termWidth); + log(div); + log(""); +} + +export function renderAliasHelp(data: AliasHelpData, opts: RenderOptions): void { + const { colors, log } = opts; + const termWidth = Math.min(opts.columns, MAX_WIDTH); + const div = divider(termWidth, colors); + + log(""); + log( + `${indent(INDENT)}${colors.bold(colors.yellow("⬡"))} ${colors.bold(colors.yellow(data.alias))}` + + ` ${colors.yellow("→")} ` + + `${colors.bold(colors.cyan(data.canonical))}`, + ); + log(`${indent(INDENT)}${colors.yellow("alias for")} ${colors.bold(data.canonical)}`); + log(div); + renderOptionHelp(data.optionHelp, opts); +} + +export function renderError(message: string, opts: RenderOptions): void { + const { colors, log } = opts; + log(`${indent(INDENT)}${colors.red("✖")} ${colors.bold(message)}`); +} + +export function renderSuccess(message: string, opts: RenderOptions): void { + const { colors, log } = opts; + log(`${indent(INDENT)}${colors.green("✔")} ${colors.bold(message)}`); +} + +export function renderWarning(message: string, opts: RenderOptions): void { + const { colors, log } = opts; + log(`${indent(INDENT)}${colors.yellow("⚠")} ${message}`); +} + +export function renderInfo(message: string, opts: RenderOptions): void { + const { colors, log } = opts; + log(`${indent(INDENT)}${colors.cyan("ℹ")} ${message}`); +} + +export function parseEnvinfoSections(raw: string): InfoSection[] { + const sections: InfoSection[] = []; + let current: InfoSection | null = null; + + for (const line of raw.split("\n")) { + const sectionMatch = line.match(/^ {2}([^:]+):\s*$/); + if (sectionMatch) { + if (current) sections.push(current); + current = { title: sectionMatch[1].trim(), rows: [] }; + continue; + } + + const rowMatch = line.match(/^ {4}([^:]+):\s+(.+)$/); + if (rowMatch && current) { + current.rows.push({ label: rowMatch[1].trim(), value: rowMatch[2].trim() }); + continue; + } + + const emptyRowMatch = line.match(/^ {4}([^:]+):\s*$/); + if (emptyRowMatch && current) { + current.rows.push({ label: emptyRowMatch[1].trim(), value: "N/A", color: (str) => str }); + } + } + + if (current) sections.push(current); + return sections.filter((section) => section.rows.length > 0); +} + +export function renderInfoOutput(rawEnvinfo: string, opts: RenderOptions): void { + const { colors, log } = opts; + const termWidth = Math.min(opts.columns, MAX_WIDTH); + const div = divider(termWidth, colors); + const sections = parseEnvinfoSections(rawEnvinfo); + + log(""); + + for (const section of sections) { + log( + `${indent(INDENT)}${colors.bold(colors.cyan("⬡"))} ${colors.bold(colors.cyan(section.title))}`, + ); + log(div); + renderRows(section.rows, colors, log, termWidth); + log(div); + log(""); + } +} + +export function renderVersionOutput(rawEnvinfo: string, opts: RenderOptions): void { + const { colors, log } = opts; + const termWidth = Math.min(opts.columns, MAX_WIDTH); + const div = divider(termWidth, colors); + const sections = parseEnvinfoSections(rawEnvinfo); + + for (const section of sections) { + log(""); + log( + `${indent(INDENT)}${colors.bold(colors.cyan("⬡"))} ${colors.bold(colors.cyan(section.title))}`, + ); + log(div); + + const labelWidth = Math.max(...section.rows.map((row) => row.label.length)); + + for (const { label, value } of section.rows) { + const arrowIdx = value.indexOf("=>"); + + if (arrowIdx !== -1) { + const requested = value.slice(0, arrowIdx).trim(); + const resolved = value.slice(arrowIdx + 2).trim(); + log( + `${indent(INDENT)}${colors.bold(label.padEnd(labelWidth))}${indent(COL_GAP)}` + + `${colors.cyan(requested.padEnd(12))} ${colors.cyan("→")} ${colors.green(colors.bold(resolved))}`, + ); + } else { + log( + `${indent(INDENT)}${colors.bold(label.padEnd(labelWidth))}${indent(COL_GAP)}${colors.green(value)}`, + ); + } + } + log(div); + } +} + +export function renderFooter(opts: RenderOptions, footer: FooterOptions = {}): void { + const { colors, log } = opts; + + if (!footer.verbose) { + log( + ` ${colors.cyan("ℹ")} Run ${colors.bold("'webpack --help=verbose'")} to see all available commands and options.`, + ); + } + + log(""); + log(` ${colors.bold("Webpack documentation:")} ${colors.cyan("https://webpack.js.org/")}`); + log( + ` ${colors.bold("CLI documentation:")} ${colors.cyan("https://webpack.js.org/api/cli/")}`, + ); + log(` ${colors.bold("Made with")} ${colors.red("♥")} ${colors.bold("by the webpack team")}`); + log(""); +} diff --git a/packages/webpack-cli/src/webpack-cli.ts b/packages/webpack-cli/src/webpack-cli.ts index ecdd3196373..631e74c8870 100644 --- a/packages/webpack-cli/src/webpack-cli.ts +++ b/packages/webpack-cli/src/webpack-cli.ts @@ -31,6 +31,22 @@ import { default as webpack, } from "webpack"; import { type Configuration as DevServerConfiguration } from "webpack-dev-server"; +import { + CommandHelpData, + HelpOption, + RenderOptions, + renderAliasHelp, + renderCommandFooter, + renderCommandHeader, + renderCommandHelp, + renderError, + renderFooter, + renderInfoOutput, + renderOptionHelp, + renderSuccess, + renderVersionOutput, + renderWarning, +} from "./ui-renderer.js"; const WEBPACK_PACKAGE_IS_CUSTOM = Boolean(process.env.WEBPACK_PACKAGE); const WEBPACK_PACKAGE = WEBPACK_PACKAGE_IS_CUSTOM @@ -88,6 +104,12 @@ interface Command extends CommanderCommand { context: Context; } +interface CommandUIOptions { + description?: string; + footer?: "global" | "command"; + skipIf?: (opts: RecordAny) => boolean; +} + interface CommandOptions< A = void, O extends CommanderArgs = CommanderArgs, @@ -101,6 +123,7 @@ interface CommandOptions< dependencies?: string[]; pkg?: string; preload?: () => Promise; + ui?: CommandUIOptions; options?: | CommandOption[] | ((command: Command & { context: C }) => CommandOption[]) @@ -657,6 +680,33 @@ class WebpackCLI { command.action(options.action); + if (options.ui) { + const { ui } = options; + + command.hook("preAction", (_thisCmd, actionCmd) => { + if (ui.skipIf?.(actionCmd.opts())) return; + + renderCommandHeader( + { + name: command.name(), + description: ui.description ?? command.description(), + }, + this.#renderOptions(), + ); + }); + + command.hook("postAction", (_thisCmd, actionCmd) => { + if (ui.skipIf?.(actionCmd.opts())) return; + + const renderOpts = this.#renderOptions(); + if (ui.footer === "command") { + renderCommandFooter(renderOpts); + } else { + renderFooter(renderOpts); + } + }); + } + return command; } @@ -990,6 +1040,45 @@ class WebpackCLI { } } + #renderOptions(): RenderOptions { + return { + colors: this.colors, + log: (line) => this.logger.raw(line), + // process.stdout.columns can be undefined in non-TTY environments + // (CI, test runners, pipes). Fall back to 80 which fits most terminals. + columns: process.stdout.columns ?? 80, + }; + } + + #buildCommandHelpData(command: Command, program: Command, isVerbose: boolean): CommandHelpData { + const visibleOptions: HelpOption[] = command.options + .filter((opt) => { + if ((opt as Option & { internal?: boolean }).internal) return false; + return isVerbose || !opt.hidden; + }) + .map((opt) => ({ + flags: opt.flags, + description: opt.description ?? "", + })); + + const globalOptions: HelpOption[] = program.options.map((opt) => ({ + flags: opt.flags, + description: opt.description ?? "", + })); + + const aliases = command.aliases(); + const usageParts = [command.name(), ...aliases].join("|"); + const usage = `webpack ${usageParts} ${command.usage()}`; + + return { + name: command.name(), + usage, + description: command.description(), + options: visibleOptions, + globalOptions, + }; + } + async #outputHelp( options: string[], isVerbose: boolean, @@ -1156,6 +1245,9 @@ class WebpackCLI { if (buildCommand) { this.logger.raw(buildCommand.helpInformation()); } + + renderFooter(this.#renderOptions(), { verbose: isVerbose }); + process.exit(0); } else { const [name] = options; @@ -1167,7 +1259,11 @@ class WebpackCLI { process.exit(2); } - this.logger.raw(command.helpInformation()); + const commandHelpData = this.#buildCommandHelpData(command, program, isVerbose); + + renderCommandHelp(commandHelpData, this.#renderOptions()); + renderFooter(this.#renderOptions(), { verbose: isVerbose }); + process.exit(0); } } else if (isHelpCommandSyntax) { let isCommandSpecified = false; @@ -1213,62 +1309,58 @@ class WebpackCLI { (option.variadic === true ? "..." : ""); const value = option.required ? `<${nameOutput}>` : option.optional ? `[${nameOutput}]` : ""; - this.logger.raw( - `${bold("Usage")}: webpack${isCommandSpecified ? ` ${commandName}` : ""} ${option.long}${ - value ? ` ${value}` : "" - }`, - ); - - if (option.short) { - this.logger.raw( - `${bold("Short:")} webpack${isCommandSpecified ? ` ${commandName}` : ""} ${ - option.short - }${value ? ` ${value}` : ""}`, - ); - } - - if (option.description) { - this.logger.raw(`${bold("Description:")} ${option.description}`); - } - const { configs } = option as Option & { configs?: ArgumentConfig[] }; + let possibleValues: string | undefined; if (configs) { - const possibleValues = configs.reduce((accumulator, currentValue) => { - if (currentValue.values) { - return [...accumulator, ...currentValue.values]; - } - + const values = configs.reduce((accumulator, currentValue) => { + if (currentValue.values) return [...accumulator, ...currentValue.values]; return accumulator; }, [] as EnumValue[]); - if (possibleValues.length > 0) { + if (values.length > 0) { // Convert the possible values to a union type string // ['mode', 'development', 'production'] => "'mode' | 'development' | 'production'" // [false, 'eval'] => "false | 'eval'" - const possibleValuesUnionTypeString = possibleValues + possibleValues = values .map((value) => (typeof value === "string" ? `'${value}'` : value)) .join(" | "); - - this.logger.raw(`${bold("Possible values:")} ${possibleValuesUnionTypeString}`); } } - this.logger.raw(""); + const canonicalName = option.long ?? optionName; + const docUrl = `https://webpack.js.org/option/${canonicalName.replace(/^--/, "")}/`; + const base = `webpack${isCommandSpecified ? ` ${commandName}` : ""}`; + + const optionHelpData = { + optionName: canonicalName, + usage: `${base} ${canonicalName}${value ? ` ${value}` : ""}`, + short: option.short ? `${base} ${option.short}${value ? ` ${value}` : ""}` : undefined, + description: option.description || undefined, + docUrl, + possibleValues, + }; + + const isShortAlias = optionName.startsWith("-") && !optionName.startsWith("--"); + + if (isShortAlias) { + renderAliasHelp( + { alias: optionName, canonical: canonicalName, optionHelp: optionHelpData }, + this.#renderOptions(), + ); + } else { + renderOptionHelp(optionHelpData, this.#renderOptions()); + } + + renderFooter(this.#renderOptions(), { verbose: isVerbose }); + process.exit(0); // TODO implement this after refactor cli arguments // logger.raw('Documentation: https://webpack.js.org/option/name/'); } else { outputIncorrectUsageOfHelp(); } - - this.logger.raw( - "To see list of all supported commands and options run 'webpack --help=verbose'.\n", - ); - this.logger.raw(`${bold("Webpack documentation:")} https://webpack.js.org/.`); - this.logger.raw(`${bold("CLI documentation:")} https://webpack.js.org/api/cli/.`); - this.logger.raw(`${bold("Made with ♥ by the webpack team")}.`); - process.exit(0); + // all branches now exit themselves so no need logger and process.exit } async #renderVersion(options: { output?: string } = {}): Promise { @@ -1772,10 +1864,26 @@ class WebpackCLI { hidden: false, }, ], + ui: { + description: "Installed package versions.", + footer: "global", + skipIf: (opts) => Boolean(opts.output), + }, action: async (options: { output?: string }) => { - const info = await this.#renderVersion(options); + if (options.output) { + // Machine-readable output requested, bypass the visual renderer entirely. + const info = await this.#renderVersion(options); + this.logger.raw(info); + return; + } - this.logger.raw(info); + const rawInfo = await this.#getInfoOutput({ + information: { + npmPackages: `{${DEFAULT_WEBPACK_PACKAGES.map((item) => `*${item}*`).join(",")}}`, + }, + }); + + renderVersionOutput(rawInfo, this.#renderOptions()); }, }, info: { @@ -1805,10 +1913,18 @@ class WebpackCLI { hidden: false, }, ], + ui: { + description: "System and environment information.", + footer: "global", + skipIf: (opts) => Boolean(opts.output), + }, action: async (options: { output?: string; additionalPackage?: string[] }) => { - const info = await this.#getInfoOutput(options); + if (options.output) { + this.logger.raw(await this.#getInfoOutput(options)); + return; + } - this.logger.raw(info); + renderInfoOutput(await this.#getInfoOutput(options), this.#renderOptions()); }, }, configtest: { @@ -1822,6 +1938,10 @@ class WebpackCLI { const webpack = await this.loadWebpack(); return { webpack }; }, + ui: { + description: "Validating your webpack configuration.", + footer: "command", + }, action: async (configPath: string | undefined, _options: CommanderArgs, cmd) => { const { webpack } = cmd.context; const env: Env = {}; @@ -1830,6 +1950,7 @@ class WebpackCLI { configPath ? { env, argv, webpack, config: [configPath] } : { env, argv, webpack }, ); const configPaths = new Set(); + const renderOpts = this.#renderOptions(); if (Array.isArray(config.options)) { for (const options of config.options) { @@ -1848,25 +1969,26 @@ class WebpackCLI { } if (configPaths.size === 0) { - this.logger.error("No configuration found."); + renderError("No configuration found.", renderOpts); process.exit(2); } - this.logger.info(`Validate '${[...configPaths].join(" ,")}'.`); + const pathList = [...configPaths].join(", "); + renderWarning(`Validating: ${pathList}`, renderOpts); try { cmd.context.webpack.validate(config.options); } catch (error) { if (this.isValidationError(error as Error)) { - this.logger.error((error as Error).message); + renderError((error as Error).message, renderOpts); } else { - this.logger.error(error); + renderError(String(error), renderOpts); } process.exit(2); } - this.logger.success("There are no validation errors in the given webpack configuration."); + renderSuccess("No validation errors found.", renderOpts); }, }, }; @@ -1953,7 +2075,7 @@ class WebpackCLI { async run(args: readonly string[], parseOptions: ParseOptions) { // Default `--color` and `--no-color` options - // eslint-disable-next-line @typescript-eslint/no-this-alias + const self: WebpackCLI = this; // Register own exit diff --git a/smoketests/missing-packages/webpack-dev-server.test.js b/smoketests/missing-packages/webpack-dev-server.test.js index 4f9c1d77630..954cf5695e4 100644 --- a/smoketests/missing-packages/webpack-dev-server.test.js +++ b/smoketests/missing-packages/webpack-dev-server.test.js @@ -13,8 +13,9 @@ const webpackDevServerTest = () => { const webpackDevServerWithHelpTest = () => { const packageName = "webpack-dev-server"; const cliArgs = ["help", "serve"]; - const logMessage = - "To see all available options you need to install 'webpack', 'webpack-dev-server'."; + // Max 49-char prefix fits in one line. + // Deleting package's names is safe because CLI appends missing package list automatically. + const logMessage = "To see all available options you need to install"; return runTestStdout({ packageName, cliArgs, logMessage }); }; diff --git a/smoketests/missing-packages/webpack.test.js b/smoketests/missing-packages/webpack.test.js index 1081c157721..811022ec72e 100644 --- a/smoketests/missing-packages/webpack.test.js +++ b/smoketests/missing-packages/webpack.test.js @@ -39,7 +39,7 @@ const serveCommand = () => { const versionCommand = () => { const packageName = "webpack"; const args = ["version"]; - const logMessage = "webpack:"; + const logMessage = "webpack"; return runTestStdout({ packageName, @@ -60,7 +60,7 @@ const helpCommand = () => { const infoCommand = () => { const packageName = "webpack"; const args = ["info"]; - const logMessage = "System:"; + const logMessage = "System"; return runTestStdout({ packageName, cliArgs: args, logMessage }); }; diff --git a/test/api/CLI.test.js b/test/api/CLI.test.js index 2dd11521a72..15883a0de26 100644 --- a/test/api/CLI.test.js +++ b/test/api/CLI.test.js @@ -1543,7 +1543,7 @@ describe("CLI API", () => { command.parseAsync(["--boolean"], { from: "user" }); - expect(command.helpInformation()).toContain("--boolean Description"); + expect(command.helpInformation()).toMatch(/--boolean\s+Description/); }); it("should make command with Boolean option and negative value and use negatedDescription", async () => { @@ -1569,7 +1569,7 @@ describe("CLI API", () => { command.parseAsync(["--no-boolean"], { from: "user" }); - expect(command.helpInformation()).toContain("--no-boolean Negated description"); + expect(command.helpInformation()).toMatch(/--no-boolean\s+Negated description/); }); }); @@ -1578,6 +1578,22 @@ describe("CLI API", () => { let exitSpy; beforeEach(async () => { + // should be new program for each test + // eslint-disable-next-line import/no-extraneous-dependencies + const { Command } = require("commander"); + + cli = new CLI(); + const freshProgram = new Command(); + freshProgram.name("webpack"); + freshProgram.configureOutput({ + writeErr: (str) => { + cli.logger.error(str); + }, + outputError: (str, write) => { + write(`Error: ${cli.capitalizeFirstLetter(str.replace(/^error:/, "").trim())}`); + }, + }); + cli.program = freshProgram; consoleSpy = jest.spyOn(globalThis.console, "log"); exitSpy = jest.spyOn(process, "exit").mockImplementation(() => {}); }); @@ -1597,5 +1613,27 @@ describe("CLI API", () => { expect(exitSpy).toHaveBeenCalledWith(0); expect(consoleSpy.mock.calls).toMatchSnapshot(); }); + + it("should display help for a short alias flag", async () => { + try { + await cli.run(["help", "-c"], { from: "user" }); + } catch { + // Nothing for tests + } + + expect(exitSpy).toHaveBeenCalledWith(0); + expect(consoleSpy.mock.calls).toMatchSnapshot(); + }); + + it("should display help for a command", async () => { + try { + await cli.run(["help", "version"], { from: "user" }); + } catch { + // Nothing for tests + } + + expect(exitSpy).toHaveBeenCalledWith(0); + expect(consoleSpy.mock.calls).toMatchSnapshot(); + }); }); }); diff --git a/test/api/__snapshots__/CLI.test.js.snap.webpack5 b/test/api/__snapshots__/CLI.test.js.snap.webpack5 index 1416f8f80b0..7c38a6d0e97 100644 --- a/test/api/__snapshots__/CLI.test.js.snap.webpack5 +++ b/test/api/__snapshots__/CLI.test.js.snap.webpack5 @@ -1,31 +1,208 @@ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing +exports[`CLI API custom help output should display help for a command 1`] = ` +[ + [ + "", + ], + [ + " ⬡ webpack version", + ], + [ + " ──────────────────────────────────────────────────────────────────────────", + ], + [ + " Output the version number of 'webpack', 'webpack-cli' and", + ], + [ + " 'webpack-dev-server' and other packages.", + ], + [ + "", + ], + [ + " Usage: webpack version|v [options]", + ], + [ + "", + ], + [ + " Options", + ], + [ + " ──────────────────────────────────────────────────────────────────────────", + ], + [ + " -o, --output To get the output in a specified format (accept json", + ], + [ + " or markdown)", + ], + [ + "", + ], + [ + " 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 other packages.", + ], + [ + " -h, --help [verbose] Display help for commands and options.", + ], + [ + "", + ], + [ + " ──────────────────────────────────────────────────────────────────────────", + ], + [ + "", + ], + [ + " ℹ Run 'webpack --help=verbose' to see all available commands and options.", + ], + [ + "", + ], + [ + " Webpack documentation: https://webpack.js.org/", + ], + [ + " CLI documentation: https://webpack.js.org/api/cli/", + ], + [ + " Made with ♥ by the webpack team", + ], + [ + "", + ], +] +`; + +exports[`CLI API custom help output should display help for a short alias flag 1`] = ` +[ + [ + "", + ], + [ + " ⬡ -c → --config", + ], + [ + " alias for --config", + ], + [ + " ──────────────────────────────────────────────────────────────────────────", + ], + [ + "", + ], + [ + " ⬡ --config", + ], + [ + " ──────────────────────────────────────────────────────────────────────────", + ], + [ + " Usage webpack --config ", + ], + [ + " Short webpack -c ", + ], + [ + " Description Provide path to one or more webpack configuration files to", + ], + [ + " process, e.g. "./webpack.config.js".", + ], + [ + " Documentation https://webpack.js.org/option/config/", + ], + [ + " ──────────────────────────────────────────────────────────────────────────", + ], + [ + "", + ], + [ + " ℹ Run 'webpack --help=verbose' to see all available commands and options.", + ], + [ + "", + ], + [ + " Webpack documentation: https://webpack.js.org/", + ], + [ + " CLI documentation: https://webpack.js.org/api/cli/", + ], + [ + " Made with ♥ by the webpack team", + ], + [ + "", + ], +] +`; + exports[`CLI API custom help output should display help information 1`] = ` [ [ - "Usage: webpack --mode ", + "", + ], + [ + " ⬡ --mode", + ], + [ + " ──────────────────────────────────────────────────────────────────────────", + ], + [ + " Usage webpack --mode ", + ], + [ + " Description Enable production optimizations or development hints.", ], [ - "Description: Enable production optimizations or development hints.", + " Documentation https://webpack.js.org/option/mode/", ], [ - "Possible values: 'development' | 'production' | 'none'", + " Possible values 'development' | 'production' | 'none'", + ], + [ + " ──────────────────────────────────────────────────────────────────────────", + ], + [ + "", + ], + [ + " ℹ Run 'webpack --help=verbose' to see all available commands and options.", ], [ "", ], [ - "To see list of all supported commands and options run 'webpack --help=verbose'. -", + " Webpack documentation: https://webpack.js.org/", ], [ - "Webpack documentation: https://webpack.js.org/.", + " CLI documentation: https://webpack.js.org/api/cli/", ], [ - "CLI documentation: https://webpack.js.org/api/cli/.", + " Made with ♥ by the webpack team", ], [ - "Made with ♥ by the webpack team.", + "", ], ] `; diff --git a/test/api/__snapshots__/ui-renderer.test.js.snap.webpack5 b/test/api/__snapshots__/ui-renderer.test.js.snap.webpack5 new file mode 100644 index 00000000000..e853e31cb8c --- /dev/null +++ b/test/api/__snapshots__/ui-renderer.test.js.snap.webpack5 @@ -0,0 +1,268 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`parseEnvinfoSections should match snapshot 1`] = ` +[ + { + "rows": [ + { + "label": "OS", + "value": "macOS 14.0", + }, + { + "label": "CPU", + "value": "Apple M2", + }, + { + "label": "Memory", + "value": "16 GB", + }, + ], + "title": "System", + }, + { + "rows": [ + { + "label": "Node", + "value": "20.1.0", + }, + { + "label": "npm", + "value": "9.6.7", + }, + { + "label": "pnpm", + "value": "Not Found", + }, + ], + "title": "Binaries", + }, + { + "rows": [ + { + "label": "webpack", + "value": "^5.105.4 => 5.105.4", + }, + { + "label": "webpack-cli", + "value": "^6.0.0 => 6.0.1", + }, + { + "label": "webpack-dev-server", + "value": "^5.1.0 => 5.2.3", + }, + ], + "title": "Packages", + }, +] +`; + +exports[`renderAliasHelp should match snapshot 1`] = ` +[ + "", + " ⬡ -c → --config", + " alias for --config", + " ──────────────────────────────────────────────────────────────────────────", + "", + " ⬡ --config", + " ──────────────────────────────────────────────────────────────────────────", + " Usage webpack --config ", + " Short webpack -c ", + " Description Provide path to a webpack configuration file.", + " Documentation https://webpack.js.org/option/config/", + " ──────────────────────────────────────────────────────────────────────────", + "", +] +`; + +exports[`renderCommandFooter should match snapshot 1`] = ` +[ + " ──────────────────────────────────────────────────────────────────────────", + "", +] +`; + +exports[`renderCommandHeader should match snapshot 1`] = ` +[ + "", + " ⬡ webpack build", + " ──────────────────────────────────────────────────────────────────────────", + " Compiling.", + "", +] +`; + +exports[`renderCommandHelp should match full output snapshot for build command 1`] = ` +[ + "", + " ⬡ webpack build", + " ──────────────────────────────────────────────────────────────────────────", + " Run webpack (default command, can be omitted).", + "", + " Usage: webpack build|bundle|b [entries...] [options]", + "", + " Options", + " ──────────────────────────────────────────────────────────────────────────", + " -c, --config Provide path to one or more webpack", + " configuration files.", + " --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'.", + " --mode Enable production optimizations or", + " development hints.", + " -o, --output-path The output directory as absolute path", + " (required).", + " -w, --watch Enter watch mode, which rebuilds on file", + " change.", + "", + " Global options", + " ──────────────────────────────────────────────────────────────────────────", + " --color Enable colors on console.", + " --no-color Disable colors on console.", + " -v, --version Output the version number.", + " -h, --help [verbose] Display help for commands and options.", + "", + " ──────────────────────────────────────────────────────────────────────────", + "", +] +`; + +exports[`renderCommandHelp should match full output snapshot for info command 1`] = ` +[ + "", + " ⬡ webpack info", + " ──────────────────────────────────────────────────────────────────────────", + " Outputs information about your system.", + "", + " Usage: webpack info|i [options]", + "", + " Options", + " ──────────────────────────────────────────────────────────────────────────", + " -o, --output Get output in a specified format (json or", + " markdown).", + " -a, --additional-package Adds additional packages to the output.", + "", + " Global options", + " ──────────────────────────────────────────────────────────────────────────", + " --color Enable colors on console.", + " --no-color Disable colors on console.", + " -v, --version Output the version number.", + " -h, --help [verbose] Display help for commands and options.", + "", + " ──────────────────────────────────────────────────────────────────────────", + "", +] +`; + +exports[`renderError should match snapshot 1`] = ` +[ + " ✖ something went wrong", +] +`; + +exports[`renderFooter should match snapshot (default) 1`] = ` +[ + " ℹ Run 'webpack --help=verbose' to see all available commands and options.", + "", + " Webpack documentation: https://webpack.js.org/", + " CLI documentation: https://webpack.js.org/api/cli/", + " Made with ♥ by the webpack team", + "", +] +`; + +exports[`renderFooter should match snapshot (verbose) 1`] = ` +[ + "", + " Webpack documentation: https://webpack.js.org/", + " CLI documentation: https://webpack.js.org/api/cli/", + " Made with ♥ by the webpack team", + "", +] +`; + +exports[`renderInfo should match snapshot 1`] = ` +[ + " ℹ just so you know", +] +`; + +exports[`renderInfoOutput should match full output snapshot 1`] = ` +[ + "", + " ⬡ System", + " ──────────────────────────────────────────────────────────────────────────", + " OS macOS 14.0", + " CPU Apple M2", + " Memory 16 GB", + " ──────────────────────────────────────────────────────────────────────────", + "", + " ⬡ Binaries", + " ──────────────────────────────────────────────────────────────────────────", + " Node 20.1.0", + " npm 9.6.7", + " pnpm Not Found", + " ──────────────────────────────────────────────────────────────────────────", + "", + " ⬡ Packages", + " ──────────────────────────────────────────────────────────────────────────", + " webpack ^5.105.4 => 5.105.4", + " webpack-cli ^6.0.0 => 6.0.1", + " webpack-dev-server ^5.1.0 => 5.2.3", + " ──────────────────────────────────────────────────────────────────────────", + "", +] +`; + +exports[`renderOptionHelp should match snapshot with all fields 1`] = ` +[ + "", + " ⬡ --mode", + " ──────────────────────────────────────────────────────────────────────────", + " Usage webpack --mode ", + " Description Enable production optimizations or development hints.", + " Documentation https://webpack.js.org/option/mode/", + " Possible values 'development' | 'production' | 'none'", + " ──────────────────────────────────────────────────────────────────────────", + "", +] +`; + +exports[`renderSuccess should match snapshot 1`] = ` +[ + " ✔ all good", +] +`; + +exports[`renderVersionOutput should match full output snapshot 1`] = ` +[ + "", + " ⬡ System", + " ──────────────────────────────────────────────────────────────────────────", + " OS macOS 14.0", + " CPU Apple M2", + " Memory 16 GB", + " ──────────────────────────────────────────────────────────────────────────", + "", + " ⬡ Binaries", + " ──────────────────────────────────────────────────────────────────────────", + " Node 20.1.0", + " npm 9.6.7", + " pnpm Not Found", + " ──────────────────────────────────────────────────────────────────────────", + "", + " ⬡ Packages", + " ──────────────────────────────────────────────────────────────────────────", + " webpack ^5.105.4 → 5.105.4", + " webpack-cli ^6.0.0 → 6.0.1", + " webpack-dev-server ^5.1.0 → 5.2.3", + " ──────────────────────────────────────────────────────────────────────────", +] +`; + +exports[`renderWarning should match snapshot 1`] = ` +[ + " ⚠ watch out", +] +`; diff --git a/test/api/ui-renderer.test.js b/test/api/ui-renderer.test.js new file mode 100644 index 00000000000..59e632a784a --- /dev/null +++ b/test/api/ui-renderer.test.js @@ -0,0 +1,691 @@ +const { + INDENT, + MAX_WIDTH, + parseEnvinfoSections, + renderAliasHelp, + renderCommandFooter, + renderCommandHeader, + renderCommandHelp, + renderError, + renderFooter, + renderInfo, + renderInfoOutput, + renderOptionHelp, + renderSuccess, + renderVersionOutput, + renderWarning, +} = require("../../packages/webpack-cli/lib/ui-renderer"); + +const stripAnsi = (str) => str.replaceAll(/\u001B\[[0-9;]*m/g, ""); + +const makeOpts = (columns = 80) => { + const lines = []; + return { + captured: lines, + opts: { + columns, + log: (line) => lines.push(line), + colors: { + bold: (s) => s, + cyan: (s) => s, + blue: (s) => s, + yellow: (s) => s, + green: (s) => s, + red: (s) => s, + }, + }, + }; +}; + +const getOutput = (lines) => lines.join("\n"); + +const ENVINFO_FIXTURE = ` + System: + OS: macOS 14.0 + CPU: Apple M2 + Memory: 16 GB + + Binaries: + Node: 20.1.0 + npm: 9.6.7 + pnpm: Not Found + + Packages: + webpack: ^5.105.4 => 5.105.4 + webpack-cli: ^6.0.0 => 6.0.1 + webpack-dev-server: ^5.1.0 => 5.2.3 +`; + +const COMMAND_HELP_BUILD = { + name: "build", + usage: "webpack build|bundle|b [entries...] [options]", + description: "Run webpack (default command, can be omitted).", + options: [ + { + flags: "-c, --config ", + description: "Provide path to one or more webpack configuration files.", + }, + { + flags: "--config-name ", + description: + "Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations.", + }, + { + flags: "-m, --merge", + description: "Merge two or more configurations using 'webpack-merge'.", + }, + { + flags: "--mode ", + description: "Enable production optimizations or development hints.", + }, + { + flags: "-o, --output-path ", + description: "The output directory as absolute path (required).", + }, + { flags: "-w, --watch", description: "Enter watch mode, which rebuilds on file change." }, + ], + globalOptions: [ + { flags: "--color", description: "Enable colors on console." }, + { flags: "--no-color", description: "Disable colors on console." }, + { flags: "-v, --version", description: "Output the version number." }, + { flags: "-h, --help [verbose]", description: "Display help for commands and options." }, + ], +}; + +const COMMAND_HELP_INFO = { + name: "info", + usage: "webpack info|i [options]", + description: "Outputs information about your system.", + options: [ + { + flags: "-o, --output ", + description: "Get output in a specified format (json or markdown).", + }, + { + flags: "-a, --additional-package ", + description: "Adds additional packages to the output.", + }, + ], + globalOptions: COMMAND_HELP_BUILD.globalOptions, +}; + +describe("renderVersionOutput", () => { + it("should render section title", () => { + const { captured, opts } = makeOpts(); + renderVersionOutput(ENVINFO_FIXTURE, opts); + expect(getOutput(captured)).toContain("Packages"); + }); + + it("should render package names", () => { + const { captured, opts } = makeOpts(); + renderVersionOutput(ENVINFO_FIXTURE, opts); + const output = getOutput(captured); + expect(output).toContain("webpack"); + expect(output).toContain("webpack-cli"); + }); + + it("should render the → arrow for range => resolved rows", () => { + const { captured, opts } = makeOpts(); + renderVersionOutput(ENVINFO_FIXTURE, opts); + expect(getOutput(captured)).toContain("→"); + }); + + it("should render requested range and resolved version separately", () => { + const { captured, opts } = makeOpts(); + renderVersionOutput(ENVINFO_FIXTURE, opts); + const output = getOutput(captured); + expect(output).toContain("^5.105.4"); + expect(output).toContain("5.105.4"); + expect(output).not.toContain("=>"); + }); + + it("should emit exactly one closing divider per section — not two", () => { + const { captured, opts } = makeOpts(); + renderVersionOutput(ENVINFO_FIXTURE, opts); + let consecutiveDividers = 0; + for (let i = 1; i < captured.length; i++) { + if (/─{10,}/.test(captured[i]) && /─{10,}/.test(captured[i - 1])) { + consecutiveDividers++; + } + } + expect(consecutiveDividers).toBe(0); + }); + + it("should not overflow terminal width", () => { + const { captured, opts } = makeOpts(80); + renderVersionOutput(ENVINFO_FIXTURE, opts); + const overflowing = captured.filter((l) => stripAnsi(l).length > 82); + expect(overflowing).toHaveLength(0); + }); + + it("should align all package names to the same column", () => { + const { captured, opts } = makeOpts(); + renderVersionOutput(ENVINFO_FIXTURE, opts); + const versionLines = captured.filter((l) => stripAnsi(l).includes("→")); + const arrowPositions = versionLines.map((l) => stripAnsi(l).indexOf("→")); + expect(new Set(arrowPositions).size).toBe(1); + }); + + it("should match full output snapshot", () => { + const { captured, opts } = makeOpts(); + renderVersionOutput(ENVINFO_FIXTURE, opts); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("renderCommandHelp", () => { + it("should render the command name in the header", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + expect(getOutput(captured)).toContain("webpack build"); + }); + + it("should render the command description", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + expect(getOutput(captured)).toContain("Run webpack"); + }); + + it("should render the Usage line with aliases", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + expect(getOutput(captured)).toContain("build|bundle|b"); + }); + + it("should render all option flags", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + const output = getOutput(captured); + expect(output).toContain("--config"); + expect(output).toContain("--mode"); + expect(output).toContain("--watch"); + }); + + it("should render all option descriptions", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + const output = getOutput(captured); + expect(output).toContain("Provide path"); + expect(output).toContain("watch mode"); + }); + + it("should render the Options section header", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + expect(getOutput(captured)).toContain("Options"); + }); + + it("should render the Global options section header", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + expect(getOutput(captured)).toContain("Global options"); + }); + + it("should render global option flags", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + expect(getOutput(captured)).toContain("--color"); + expect(getOutput(captured)).toContain("--no-color"); + }); + + it("should use the same column width for Options and Global options", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + const optionLines = captured.filter((l) => stripAnsi(l).startsWith(" -")); + const descStarts = optionLines + .map((l) => { + const stripped = stripAnsi(l); + const match = stripped.match(/^ {2}\S.*? +/); + return match ? match[0].length : null; + }) + .filter((n) => n !== null); + expect(new Set(descStarts).size).toBe(1); + }); + + it("should wrap long descriptions within terminal width", async () => { + const longDesc = { + ...COMMAND_HELP_BUILD, + options: [{ flags: "--very-long-option-name", description: "A ".repeat(80).trim() }], + }; + const { captured, opts } = makeOpts(80); + renderCommandHelp(longDesc, opts); + const overflowing = captured.filter((l) => stripAnsi(l).length > 82); + expect(overflowing).toHaveLength(0); + }); + + it("should work for the info command", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_INFO, opts); + const output = getOutput(captured); + expect(output).toContain("webpack info"); + expect(output).toContain("--output"); + expect(output).toContain("--additional-package"); + }); + + it("should not overflow terminal width", async () => { + const { captured, opts } = makeOpts(80); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + const overflowing = captured.filter((l) => stripAnsi(l).length > 82); + expect(overflowing).toHaveLength(0); + }); + + it("should not paginate when paginate=false even with many options", async () => { + const manyOptions = Array.from({ length: 40 }, (_, i) => ({ + flags: `--option-${i}`, + description: `Description for option ${i}`, + })); + const { captured, opts } = makeOpts(); + renderCommandHelp({ ...COMMAND_HELP_BUILD, options: manyOptions }, opts); + expect(captured.filter((l) => l.includes("--option-"))).toHaveLength(40); + }); + + it("should match full output snapshot for build command", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_BUILD, opts); + expect(captured).toMatchSnapshot(); + }); + + it("should match full output snapshot for info command", async () => { + const { captured, opts } = makeOpts(); + renderCommandHelp(COMMAND_HELP_INFO, opts); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("renderCommandHeader", () => { + it("should render 'webpack ' in the header", () => { + const { captured, opts } = makeOpts(); + renderCommandHeader({ name: "build", description: "Compiling." }, opts); + expect(getOutput(captured)).toContain("webpack build"); + }); + + it("should render the description", () => { + const { captured, opts } = makeOpts(); + renderCommandHeader({ name: "build", description: "Compiling." }, opts); + expect(getOutput(captured)).toContain("Compiling."); + }); + + it("should render a divider", () => { + const { captured, opts } = makeOpts(); + renderCommandHeader({ name: "build", description: "Compiling." }, opts); + expect(captured.some((l) => /─{10,}/.test(l))).toBe(true); + }); + + it("should include the ⬡ icon", () => { + const { captured, opts } = makeOpts(); + renderCommandHeader({ name: "build", description: "Compiling." }, opts); + expect(getOutput(captured)).toContain("⬡"); + }); + + it("should omit description block when empty", () => { + const { captured, opts } = makeOpts(); + renderCommandHeader({ name: "build", description: "" }, opts); + const nonEmpty = captured.filter((l) => l.trim().length > 0); + expect(nonEmpty).toHaveLength(2); // icon+title + divider + }); + + it("should cap divider at MAX_WIDTH on wide terminals", () => { + const { captured, opts } = makeOpts(300); + renderCommandHeader({ name: "build", description: "Building." }, opts); + const div = captured.find((l) => /─{10,}/.test(l)); + expect(stripAnsi(div).length).toBeLessThanOrEqual(INDENT + MAX_WIDTH); + }); + + it("should match snapshot", () => { + const { captured, opts } = makeOpts(); + renderCommandHeader({ name: "build", description: "Compiling." }, opts); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("renderCommandFooter", () => { + it("should render a divider", () => { + const { captured, opts } = makeOpts(); + renderCommandFooter(opts); + expect(captured.some((l) => /─{10,}/.test(l))).toBe(true); + }); + + it("should end with a blank line", () => { + const { captured, opts } = makeOpts(); + renderCommandFooter(opts); + expect(captured[captured.length - 1]).toBe(""); + }); + + it("header and footer dividers should be the same length", () => { + const hCapture = makeOpts(80); + renderCommandHeader({ name: "build", description: "" }, hCapture.opts); + const hDiv = hCapture.captured.find((l) => /─{10,}/.test(l)); + + const fCapture = makeOpts(80); + renderCommandFooter(fCapture.opts); + const fDiv = fCapture.captured.find((l) => /─{10,}/.test(l)); + + expect(stripAnsi(hDiv)).toHaveLength(stripAnsi(fDiv).length); + }); + + it("should match snapshot", () => { + const { captured, opts } = makeOpts(); + renderCommandFooter(opts); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("renderOptionHelp", () => { + it("should render option name in header", () => { + const { captured, opts } = makeOpts(); + renderOptionHelp( + { + optionName: "--mode", + usage: "webpack --mode ", + docUrl: "https://webpack.js.org/option/mode/", + }, + opts, + ); + expect(getOutput(captured)).toContain("--mode"); + }); + + it("should render dividers", () => { + const { captured, opts } = makeOpts(); + renderOptionHelp( + { + optionName: "--mode", + usage: "webpack --mode ", + docUrl: "https://webpack.js.org/option/mode/", + }, + opts, + ); + expect(captured.filter((l) => /─{10,}/.test(l)).length).toBeGreaterThanOrEqual(2); + }); + + it("should render Usage row", () => { + const { captured, opts } = makeOpts(); + renderOptionHelp( + { + optionName: "--mode", + usage: "webpack --mode ", + docUrl: "https://webpack.js.org/option/mode/", + }, + opts, + ); + expect(getOutput(captured)).toContain("Usage"); + }); + + it("should render Short row when provided", () => { + const { captured, opts } = makeOpts(); + renderOptionHelp( + { + optionName: "--devtool", + usage: "webpack --devtool ", + short: "webpack -d ", + docUrl: "https://webpack.js.org/option/devtool/", + }, + opts, + ); + expect(getOutput(captured)).toContain("Short"); + }); + + it("should not render Short row when absent", () => { + const { captured, opts } = makeOpts(); + renderOptionHelp( + { + optionName: "--mode", + usage: "webpack --mode ", + docUrl: "https://webpack.js.org/option/mode/", + }, + opts, + ); + expect(getOutput(captured)).not.toContain("Short"); + }); + + it("should render Description when provided", () => { + const { captured, opts } = makeOpts(); + renderOptionHelp( + { + optionName: "--mode", + usage: "webpack --mode ", + description: "Set the mode.", + docUrl: "https://webpack.js.org/option/mode/", + }, + opts, + ); + expect(getOutput(captured)).toContain("Set the mode."); + }); + + it("should render Possible values when provided", () => { + const { captured, opts } = makeOpts(); + renderOptionHelp( + { + optionName: "--mode", + usage: "webpack --mode ", + docUrl: "https://webpack.js.org/option/mode/", + possibleValues: "'development' | 'production' | 'none'", + }, + opts, + ); + expect(getOutput(captured)).toContain("'development'"); + }); + + it("should cap divider width at MAX_WIDTH", () => { + const { captured, opts } = makeOpts(200); + renderOptionHelp( + { + optionName: "--mode", + usage: "webpack --mode ", + docUrl: "https://webpack.js.org/option/mode/", + }, + opts, + ); + const div = captured.find((l) => /─{10,}/.test(l)); + expect(stripAnsi(div).length).toBeLessThanOrEqual(INDENT + MAX_WIDTH); + }); + + it("should match snapshot with all fields", () => { + const { captured, opts } = makeOpts(); + renderOptionHelp( + { + optionName: "--mode", + usage: "webpack --mode ", + description: "Enable production optimizations or development hints.", + docUrl: "https://webpack.js.org/option/mode/", + possibleValues: "'development' | 'production' | 'none'", + }, + opts, + ); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("renderAliasHelp", () => { + const base = { + optionName: "--config", + usage: "webpack --config ", + short: "webpack -c ", + description: "Provide path to a webpack configuration file.", + docUrl: "https://webpack.js.org/option/config/", + }; + + it("should show alias, canonical, arrow and alias-for label", () => { + const { captured, opts } = makeOpts(); + renderAliasHelp({ alias: "-c", canonical: "--config", optionHelp: base }, opts); + const output = getOutput(captured); + expect(output).toContain("-c"); + expect(output).toContain("--config"); + expect(output).toContain("→"); + expect(output).toContain("alias for"); + }); + + it("should render full option help after redirect", () => { + const { captured, opts } = makeOpts(); + renderAliasHelp({ alias: "-c", canonical: "--config", optionHelp: base }, opts); + expect(getOutput(captured)).toContain("Usage"); + expect(getOutput(captured)).toContain("Documentation"); + }); + + it("should match snapshot", () => { + const { captured, opts } = makeOpts(); + renderAliasHelp({ alias: "-c", canonical: "--config", optionHelp: base }, opts); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("renderError", () => { + it("outputs message with ✖", () => { + const { captured, opts } = makeOpts(); + renderError("something went wrong", opts); + expect(getOutput(captured)).toContain("✖"); + expect(getOutput(captured)).toContain("something went wrong"); + }); + + it("should match snapshot", () => { + const { captured, opts } = makeOpts(); + renderError("something went wrong", opts); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("renderSuccess", () => { + it("outputs message with ✔", () => { + const { captured, opts } = makeOpts(); + renderSuccess("all good", opts); + expect(getOutput(captured)).toContain("✔"); + expect(getOutput(captured)).toContain("all good"); + }); + + it("should match snapshot", () => { + const { captured, opts } = makeOpts(); + renderSuccess("all good", opts); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("renderWarning", () => { + it("outputs message with ⚠", () => { + const { captured, opts } = makeOpts(); + renderWarning("watch out", opts); + expect(getOutput(captured)).toContain("⚠"); + expect(getOutput(captured)).toContain("watch out"); + }); + + it("should match snapshot", () => { + const { captured, opts } = makeOpts(); + renderWarning("watch out", opts); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("renderInfo", () => { + it("outputs message with ℹ", () => { + const { captured, opts } = makeOpts(); + renderInfo("just so you know", opts); + expect(getOutput(captured)).toContain("ℹ"); + expect(getOutput(captured)).toContain("just so you know"); + }); + + it("should match snapshot", () => { + const { captured, opts } = makeOpts(); + renderInfo("just so you know", opts); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("parseEnvinfoSections", () => { + it("returns one section per heading", () => { + const sections = parseEnvinfoSections(ENVINFO_FIXTURE); + expect(sections.map((s) => s.title)).toEqual(["System", "Binaries", "Packages"]); + }); + + it("parses key/value rows correctly", () => { + const sections = parseEnvinfoSections(ENVINFO_FIXTURE); + const system = sections.find((s) => s.title === "System"); + expect(system.rows).toEqual( + expect.arrayContaining([expect.objectContaining({ label: "OS", value: "macOS 14.0" })]), + ); + }); + + it("returns empty array for empty string", () => { + expect(parseEnvinfoSections("")).toHaveLength(0); + }); + + it("skips sections with no parseable rows", () => { + const sections = parseEnvinfoSections("\n Empty:\n\n Real:\n Key: value\n"); + const titles = sections.map((s) => s.title); + expect(titles).not.toContain("Empty"); + expect(titles).toContain("Real"); + }); + + it("should match snapshot", () => { + const sections = parseEnvinfoSections(ENVINFO_FIXTURE); + // strip color functions — not serialisable in snapshots + const serialisable = sections.map((s) => ({ + title: s.title, + rows: s.rows.map(({ label, value }) => ({ label, value })), + })); + expect(serialisable).toMatchSnapshot(); + }); +}); + +describe("renderInfoOutput", () => { + it("renders section headers and key/value rows", () => { + const { captured, opts } = makeOpts(); + renderInfoOutput(ENVINFO_FIXTURE, opts); + const output = getOutput(captured); + expect(output).toContain("System"); + expect(output).toContain("OS"); + expect(output).toContain("macOS 14.0"); + }); + + it("does not overflow terminal width", () => { + const { captured, opts } = makeOpts(80); + renderInfoOutput(ENVINFO_FIXTURE, opts); + expect(captured.filter((l) => stripAnsi(l).length > 82)).toHaveLength(0); + }); + + it("produces no meaningful output for empty input", () => { + const { captured, opts } = makeOpts(); + renderInfoOutput("", opts); + expect(captured.filter((l) => l.trim().length > 0)).toHaveLength(0); + }); + + it("should match full output snapshot", () => { + const { captured, opts } = makeOpts(); + renderInfoOutput(ENVINFO_FIXTURE, opts); + expect(captured).toMatchSnapshot(); + }); +}); + +describe("renderFooter", () => { + it("shows verbose hint by default, not when verbose=true", () => { + const { captured: a, opts: optsA } = makeOpts(); + renderFooter(optsA); + expect(getOutput(a)).toContain("--help=verbose"); + + const { captured: b, opts: optsB } = makeOpts(); + renderFooter(optsB, { verbose: true }); + expect(getOutput(b)).not.toContain("--help=verbose"); + }); + + it("shows webpack and CLI docs URLs", () => { + const { captured, opts } = makeOpts(); + renderFooter(opts); + expect(getOutput(captured)).toContain("https://webpack.js.org/"); + expect(getOutput(captured)).toContain("https://webpack.js.org/api/cli/"); + }); + + it("shows made with webpack team message", () => { + const { captured, opts } = makeOpts(); + renderFooter(opts); + expect(getOutput(captured)).toContain("webpack team"); + }); + + it("should match snapshot (default)", () => { + const { captured, opts } = makeOpts(); + renderFooter(opts); + expect(captured).toMatchSnapshot(); + }); + + it("should match snapshot (verbose)", () => { + const { captured, opts } = makeOpts(); + renderFooter(opts, { verbose: true }); + expect(captured).toMatchSnapshot(); + }); +}); diff --git a/test/build/config/error-array/__snapshots__/config-array-error.test.js.snap.webpack5 b/test/build/config/error-array/__snapshots__/config-array-error.test.js.snap.webpack5 index 3b3b72ef37d..a495b0c60a1 100644 --- a/test/build/config/error-array/__snapshots__/config-array-error.test.js.snap.webpack5 +++ b/test/build/config/error-array/__snapshots__/config-array-error.test.js.snap.webpack5 @@ -3,8 +3,8 @@ exports[`config with invalid array syntax should throw syntax error and exit with non-zero exit code when even 1 object has syntax error 1`] = ` "[webpack-cli] Failed to load './webpack.config.js' config ▶ ESM (\`import\`) failed: - Unexpected token ';' +Unexpected token ';' ▶ CJS (\`require\`) failed: - Unexpected token ';'" +Unexpected token ';'" `; diff --git a/test/build/config/error-commonjs/__snapshots__/config-error.test.js.snap.webpack5 b/test/build/config/error-commonjs/__snapshots__/config-error.test.js.snap.webpack5 index cfa64d5bab4..8c577ff96b6 100644 --- a/test/build/config/error-commonjs/__snapshots__/config-error.test.js.snap.webpack5 +++ b/test/build/config/error-commonjs/__snapshots__/config-error.test.js.snap.webpack5 @@ -3,8 +3,8 @@ exports[`config with errors should throw syntax error and exit with non-zero exit code 1`] = ` "[webpack-cli] Failed to load '/test/build/config/error-commonjs/syntax-error.js' config ▶ ESM (\`import\`) failed: - Unexpected token ';' +Unexpected token ';' ▶ CJS (\`require\`) failed: - Unexpected token ';'" +Unexpected token ';'" `; diff --git a/test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack5 b/test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack5 index f97b3daecd6..9556fc9aaa7 100644 --- a/test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack5 +++ b/test/configtest/with-config-path/__snapshots__/with-config-path.test.js.snap.webpack5 @@ -7,35 +7,37 @@ exports[`'configtest' command with the configuration path option should throw er exports[`'configtest' command with the configuration path option should throw syntax error: stderr 1`] = ` "[webpack-cli] Failed to load './syntax-error.config.js' config ▶ ESM (\`import\`) failed: - Unexpected token ';' +Unexpected token ';' ▶ CJS (\`require\`) failed: - Unexpected token ';'" +Unexpected token ';'" `; exports[`'configtest' command with the configuration path option should throw syntax error: stdout 1`] = `""`; -exports[`'configtest' command with the configuration path option should throw validation error: stderr 1`] = ` -"[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. +exports[`'configtest' command with the configuration path option should throw validation error: stderr 1`] = `""`; + +exports[`'configtest' command with the configuration path option should throw validation error: stdout 1`] = ` +"Validating: ./error.config.js +Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - configuration.mode should be one of these: - "development" | "production" | "none" - -> Enable production optimizations or development hints." + "development" | "production" | "none" + -> Enable production optimizations or development hints." `; -exports[`'configtest' command with the configuration path option should throw validation error: stdout 1`] = `"[webpack-cli] Validate './error.config.js'."`; +exports[`'configtest' command with the configuration path option should validate the config with alias 't': stderr 1`] = `""`; -exports[`'configtest' command with the configuration path option should validate the config with alias 't': stderr 1`] = ` -"[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. +exports[`'configtest' command with the configuration path option should validate the config with alias 't': stdout 1`] = ` +"Validating: ./error.config.js +Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - configuration.mode should be one of these: - "development" | "production" | "none" - -> Enable production optimizations or development hints." + "development" | "production" | "none" + -> Enable production optimizations or development hints." `; -exports[`'configtest' command with the configuration path option should validate the config with alias 't': stdout 1`] = `"[webpack-cli] Validate './error.config.js'."`; - exports[`'configtest' command with the configuration path option should validate webpack config successfully: stderr 1`] = `""`; exports[`'configtest' command with the configuration path option should validate webpack config successfully: stdout 1`] = ` -"[webpack-cli] Validate './basic.config.js'. -[webpack-cli] There are no validation errors in the given webpack configuration." +"Validating: ./basic.config.js +No validation errors found." `; diff --git a/test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack5 b/test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack5 index ad0ccb9e75c..730c317f9a1 100644 --- a/test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack5 +++ b/test/configtest/without-config-path-custom-extension/__snapshots__/without-config-path.test.js.snap.webpack5 @@ -3,6 +3,6 @@ exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = ` -"[webpack-cli] Validate '/test/configtest/without-config-path-custom-extension/webpack.config.json'. -[webpack-cli] There are no validation errors in the given webpack configuration." +"Validating: /test/configtest/without-config-path-custom-extension/webpack.config.json +No validation errors found." `; diff --git a/test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack5 b/test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack5 index 1935057293c..220075016af 100644 --- a/test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack5 +++ b/test/configtest/without-config-path-error/__snapshots__/without-config-path-error.test.js.snap.webpack5 @@ -1,10 +1,11 @@ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing -exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = ` -"[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; + +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = ` +"Validating: /test/configtest/without-config-path-error/webpack.config.js +Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - configuration.mode should be one of these: - "development" | "production" | "none" - -> Enable production optimizations or development hints." + "development" | "production" | "none" + -> Enable production optimizations or development hints." `; - -exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = `"[webpack-cli] Validate '/test/configtest/without-config-path-error/webpack.config.js'."`; diff --git a/test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack5 b/test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack5 index c0d7f799622..15964952d74 100644 --- a/test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack5 +++ b/test/configtest/without-config-path-multi-compiler-mode/__snapshots__/without-config-path-multi-compiler-mode.test.js.snap.webpack5 @@ -3,6 +3,6 @@ exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = ` -"[webpack-cli] Validate '/test/configtest/without-config-path-multi-compiler-mode/webpack.config.js'. -[webpack-cli] There are no validation errors in the given webpack configuration." +"Validating: /test/configtest/without-config-path-multi-compiler-mode/webpack.config.js +No validation errors found." `; diff --git a/test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack5 b/test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack5 index 644eaea3844..6d657afd6ce 100644 --- a/test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack5 +++ b/test/configtest/without-config-path-no-configuration/__snapshots__/without-config-path-no-configuration.test.js.snap.webpack5 @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing -exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `"[webpack-cli] No configuration found."`; +exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; -exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = `""`; +exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = `"No configuration found."`; diff --git a/test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack5 b/test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack5 index 641a870ec09..26872ccb364 100644 --- a/test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack5 +++ b/test/configtest/without-config-path/__snapshots__/without-config-path.test.js.snap.webpack5 @@ -3,6 +3,6 @@ exports[`'configtest' command without the configuration path option should validate default configuration: stderr 1`] = `""`; exports[`'configtest' command without the configuration path option should validate default configuration: stdout 1`] = ` -"[webpack-cli] Validate '/test/configtest/without-config-path/webpack.config.js'. -[webpack-cli] There are no validation errors in the given webpack configuration." +"Validating: /test/configtest/without-config-path/webpack.config.js +No validation errors found." `; diff --git a/test/external-command/external-command.test.js b/test/external-command/external-command.test.js index 187814fad34..38b1ccd89f5 100644 --- a/test/external-command/external-command.test.js +++ b/test/external-command/external-command.test.js @@ -28,8 +28,10 @@ describe("external command", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("Usage: webpack custom-command|cc [options]"); - expect(stdout).toContain("-o, --output To get the output in a specified format"); + expect(stdout).toContain("Usage"); + expect(stdout).toContain("webpack custom-command|cc [options]"); + expect(stdout).toContain("-o, --output "); + expect(stdout).toContain("To get the output in a specified format"); }); it("should work with help for option", async () => { @@ -43,8 +45,10 @@ describe("external command", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("Usage: webpack custom-command --output "); - expect(stdout).toContain("Description: To get the output in a specified format"); + expect(stdout).toContain("Usage"); + expect(stdout).toContain("webpack custom-command --output "); + expect(stdout).toContain("Description"); + expect(stdout).toContain("To get the output in a specified format"); }); it("should handle errors in external commands", async () => { diff --git a/test/help/__snapshots__/help.test.js.snap.devServer5.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer5.webpack5 index 3449b88e5e7..9afb3a5d458 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer5.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer5.webpack5 @@ -99,48 +99,48 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. +-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'. +--env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. +--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. +--disable-interpret Disable interpret for loading the config file. +-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. +-e, --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. +-t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. +-w, --watch Enter watch mode, which rebuilds on file change. +--watch-options-stdin Stop watching when stdin stream has ended. 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 other packages. - -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 other packages. +-h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - 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 other packages. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). +configtest|t [config-path] Validate a webpack configuration. +help|h [command] [option] Display help for commands and options. +info|i [options] Outputs information about your system. +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 other packages. +watch|w [entries...] [options] Run webpack and watch for files changes. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; @@ -152,48 +152,48 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. +-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'. +--env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. +--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. +--disable-interpret Disable interpret for loading the config file. +-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. +-e, --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. +-t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. +-w, --watch Enter watch mode, which rebuilds on file change. +--watch-options-stdin Stop watching when stdin stream has ended. 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 other packages. - -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 other packages. +-h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - 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 other packages. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). +configtest|t [config-path] Validate a webpack configuration. +help|h [command] [option] Display help for commands and options. +info|i [options] Outputs information about your system. +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 other packages. +watch|w [entries...] [options] Run webpack and watch for files changes. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information and taking precedence when "--help" and "--version" option using together: stderr 1`] = `""`; @@ -205,2141 +205,5521 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. +-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'. +--env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. +--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. +--disable-interpret Disable interpret for loading the config file. +-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. +-e, --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. +-t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. +-w, --watch Enter watch mode, which rebuilds on file change. +--watch-options-stdin Stop watching when stdin stream has ended. 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 other packages. - -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 other packages. +-h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - 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 other packages. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). +configtest|t [config-path] Validate a webpack configuration. +help|h [command] [option] Display help for commands and options. +info|i [options] Outputs information about your system. +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 other packages. +watch|w [entries...] [options] Run webpack and watch for files changes. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'b' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'b' command using command syntax: stdout 1`] = ` -"Usage: webpack build|bundle|b [entries...] [options] - -Run webpack (default command, can be omitted). - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack (default command, can be omitted). + +Usage: webpack build|bundle|b [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'b' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 'b' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack build|bundle|b [entries...] [options] - -Run webpack (default command, can be omitted). - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - --no-amd Negative 'amd' option. - --bail Report the first error as a hard error instead of tolerating it. - --no-bail Negative 'bail' option. - --cache Enable in memory caching. Disable caching. - --no-cache Negative 'cache' option. - --cache-cache-unaffected Additionally cache computation of modules that are unchanged and reference only unchanged modules. - --no-cache-cache-unaffected Negative 'cache-cache-unaffected' option. - --cache-max-generations Number of generations unused cache entries stay in memory cache +"Run webpack (default command, can be omitted). + +Usage: webpack build|bundle|b [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +--no-amd Negative 'amd' option. +--bail Report the first error as a hard error + instead of tolerating it. +--no-bail Negative 'bail' option. +--cache Enable in memory caching. Disable + caching. +--no-cache Negative 'cache' option. +--cache-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules. +--no-cache-cache-unaffected Negative 'cache-cache-unaffected' + option. +--cache-max-generations Number of generations unused cache + entries stay in memory cache at + minimum (1 = may be removed after + unused for a single compilation, ..., + Infinity: kept forever). +--cache-type In memory caching. Filesystem caching. +--cache-allow-collecting-memory Allows to collect unused memory + allocated during deserialization. This + requires copying data into smaller + buffers and has a performance cost. +--no-cache-allow-collecting-memory Negative + 'cache-allow-collecting-memory' + option. +--cache-cache-directory Base directory for the cache (defaults + to node_modules/.cache/webpack). +--cache-cache-location Locations for the cache (defaults to + cacheDirectory / name). +--cache-compression Compression type used for the cache + files. +--no-cache-compression Negative 'cache-compression' option. +--cache-hash-algorithm Algorithm used for generation the hash + (see node.js crypto package). +--cache-idle-timeout Time in ms after which idle period the + cache storing should happen. +--cache-idle-timeout-after-large-changes Time in ms after which idle period the + cache storing should happen when + larger changes has been detected + (cumulative build time > 2 x avg cache + store time). +--cache-idle-timeout-for-initial-store Time in ms after which idle period the + initial cache storing should happen. +--cache-immutable-paths A RegExp matching an immutable + directory (usually a package manager + cache directory, including the tailing + slash) A path to an immutable + directory (usually a package manager + cache directory). +--cache-immutable-paths-reset Clear all items provided in + 'cache.immutablePaths' configuration. + List of paths that are managed by a + package manager and contain a version + or hash in its path so all files are + immutable. +--cache-managed-paths A RegExp matching a managed directory + (usually a node_modules directory, + including the tailing slash) A path to + a managed directory (usually a + node_modules directory). +--cache-managed-paths-reset Clear all items provided in + 'cache.managedPaths' configuration. + List of paths that are managed by a + package manager and can be trusted to + not be modified otherwise. +--cache-max-age Time for which unused cache entries + stay in the filesystem cache at + minimum (in milliseconds). +--cache-max-memory-generations Number of generations unused cache + entries stay in memory cache at + minimum (0 = no memory cache used, 1 = + may be removed after unused for a + single compilation, ..., Infinity: + kept forever). Cache entries will be + deserialized from disk when removed + from memory cache. +--cache-memory-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules in + memory. +--no-cache-memory-cache-unaffected Negative + 'cache-memory-cache-unaffected' + option. +--cache-name Name for the cache. Different names + will lead to different coexisting + caches. +--cache-profile Track and log detailed timing + information for individual cache + items. +--no-cache-profile Negative 'cache-profile' option. +--cache-readonly Enable/disable readonly mode. +--no-cache-readonly Negative 'cache-readonly' option. +--cache-store When to store data to the filesystem. + (pack: Store data when compiler is + idle in a single file). +--cache-version Version of the cache data. Different + versions won't allow to reuse the + cache and override existing content. + Update the version when config changed + in a way which doesn't allow to reuse + cache. This will invalidate the cache. +--context The base directory (absolute path!) + for resolving the \`entry\` option. If + \`output.pathinfo\` is set, the included + pathinfo is shortened to this + directory. +--dependencies References to another configuration to + depend on. +--dependencies-reset Clear all items provided in + 'dependencies' configuration. + References to other configurations to + depend on. +--no-dev-server Negative 'dev-server' option. +--devtool-type Which asset type should receive this + devtool value. +--devtool-use A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool-use Negative 'devtool-use' option. +--devtool-reset Clear all items provided in 'devtool' + configuration. A developer tool to + enhance debugging (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--dotenv Enable Dotenv plugin with default + options. +--no-dotenv Negative 'dotenv' option. +--dotenv-dir The directory from which .env files + are loaded. Can be an absolute path, + false will disable the .env file + loading. +--no-dotenv-dir Negative 'dotenv-dir' option. +--dotenv-prefix A prefix that environment variables + must start with to be exposed. +--dotenv-prefix-reset Clear all items provided in + 'dotenv.prefix' configuration. Only + expose environment variables that + start with these prefixes. Defaults to + 'WEBPACK_'. +--dotenv-template A template pattern for .env file + names. +--dotenv-template-reset Clear all items provided in + 'dotenv.template' configuration. + Template patterns for .env file names. + Use [mode] as placeholder for the + webpack mode. Defaults to ['.env', + '.env.local', '.env.[mode]', + '.env.[mode].local']. +--entry A module that is loaded upon startup. + Only the last one is exported. +--entry-reset Clear all items provided in 'entry' + configuration. All modules are loaded + upon startup. The last one is + exported. +--experiments-async-web-assembly Support WebAssembly as asynchronous + EcmaScript Module. +--no-experiments-async-web-assembly Negative + 'experiments-async-web-assembly' + option. +--experiments-back-compat Enable backward-compat layer with + deprecation warnings for many webpack + 4 APIs. +--no-experiments-back-compat Negative 'experiments-back-compat' + option. +--experiments-build-http-allowed-uris Allowed URI pattern. Allowed URI + (resp. the beginning of it). +--experiments-build-http-allowed-uris-reset Clear all items provided in + 'experiments.buildHttp.allowedUris' + configuration. List of allowed URIs + (resp. the beginning of them). +--experiments-build-http-cache-location Location where resource content is + stored for lockfile entries. It's also + possible to disable storing by passing + false. +--no-experiments-build-http-cache-location Negative + 'experiments-build-http-cache-location + ' option. +--experiments-build-http-frozen When set, anything that would lead to + a modification of the lockfile or any + resource content, will result in an + error. +--no-experiments-build-http-frozen Negative + 'experiments-build-http-frozen' + option. +--experiments-build-http-lockfile-location Location of the lockfile. +--experiments-build-http-proxy Proxy configuration, which can be used + to specify a proxy server to use for + HTTP requests. +--experiments-build-http-upgrade When set, resources of existing + lockfile entries will be fetched and + entries will be upgraded when resource + content has changed. +--no-experiments-build-http-upgrade Negative + 'experiments-build-http-upgrade' + option. +--experiments-cache-unaffected Enable additional in memory caching of + modules that are unchanged and + reference only unchanged modules. +--no-experiments-cache-unaffected Negative + 'experiments-cache-unaffected' option. +--experiments-css Enable css support. +--no-experiments-css Negative 'experiments-css' option. +--experiments-defer-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-defer + -import-eval. This allows to defer + execution of a module until it's first + use. +--no-experiments-defer-import Negative 'experiments-defer-import' + option. +--experiments-future-defaults Apply defaults of next major version. +--no-experiments-future-defaults Negative 'experiments-future-defaults' + option. +--experiments-lazy-compilation Compile entrypoints and import()s only + when they are accessed. +--no-experiments-lazy-compilation Negative + 'experiments-lazy-compilation' option. +--experiments-lazy-compilation-backend-client A custom client. +--experiments-lazy-compilation-backend-listen A port. +--experiments-lazy-compilation-backend-listen-host A host. +--experiments-lazy-compilation-backend-listen-port A port. +--experiments-lazy-compilation-backend-protocol Specifies the protocol the client + should use to connect to the server. +--experiments-lazy-compilation-entries Enable/disable lazy compilation for + entries. +--no-experiments-lazy-compilation-entries Negative + 'experiments-lazy-compilation-entries' + option. +--experiments-lazy-compilation-imports Enable/disable lazy compilation for + import() modules. +--no-experiments-lazy-compilation-imports Negative + 'experiments-lazy-compilation-imports' + option. +--experiments-lazy-compilation-test Specify which entrypoints or + import()ed modules should be lazily + compiled. This is matched with the + imported module and not the entrypoint + name. +--experiments-output-module Allow output javascript files as + module source type. +--no-experiments-output-module Negative 'experiments-output-module' + option. +--experiments-source-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-sourc + e-phase-imports. This allows importing + modules at stack. - --watch-options-poll [value] \`number\`: use polling with specified interval. \`true\`: use polling. - --no-watch-options-poll Negative 'watch-options-poll' 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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +--watch-options-poll [value] \`number\`: use polling with specified + interval. \`true\`: use polling. +--no-watch-options-poll Negative 'watch-options-poll' 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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'b' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'b' command using the "--help" option: stdout 1`] = ` -"Usage: webpack build|bundle|b [entries...] [options] - -Run webpack (default command, can be omitted). - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack (default command, can be omitted). + +Usage: webpack build|bundle|b [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'build' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'build' and respect the "--color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack build|bundle|b [entries...] [options] - -Run webpack (default command, can be omitted). - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack (default command, can be omitted). + +Usage: webpack build|bundle|b [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'build' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'build' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack build|bundle|b [entries...] [options] - -Run webpack (default command, can be omitted). - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack (default command, can be omitted). + +Usage: webpack build|bundle|b [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'build' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'build' command using command syntax: stdout 1`] = ` -"Usage: webpack build|bundle|b [entries...] [options] - -Run webpack (default command, can be omitted). - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack (default command, can be omitted). + +Usage: webpack build|bundle|b [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'build' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 'build' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack build|bundle|b [entries...] [options] - -Run webpack (default command, can be omitted). - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - --no-amd Negative 'amd' option. - --bail Report the first error as a hard error instead of tolerating it. - --no-bail Negative 'bail' option. - --cache Enable in memory caching. Disable caching. - --no-cache Negative 'cache' option. - --cache-cache-unaffected Additionally cache computation of modules that are unchanged and reference only unchanged modules. - --no-cache-cache-unaffected Negative 'cache-cache-unaffected' option. - --cache-max-generations Number of generations unused cache entries stay in memory cache +"Run webpack (default command, can be omitted). + +Usage: webpack build|bundle|b [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +--no-amd Negative 'amd' option. +--bail Report the first error as a hard error + instead of tolerating it. +--no-bail Negative 'bail' option. +--cache Enable in memory caching. Disable + caching. +--no-cache Negative 'cache' option. +--cache-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules. +--no-cache-cache-unaffected Negative 'cache-cache-unaffected' + option. +--cache-max-generations Number of generations unused cache + entries stay in memory cache at + minimum (1 = may be removed after + unused for a single compilation, ..., + Infinity: kept forever). +--cache-type In memory caching. Filesystem caching. +--cache-allow-collecting-memory Allows to collect unused memory + allocated during deserialization. This + requires copying data into smaller + buffers and has a performance cost. +--no-cache-allow-collecting-memory Negative + 'cache-allow-collecting-memory' + option. +--cache-cache-directory Base directory for the cache (defaults + to node_modules/.cache/webpack). +--cache-cache-location Locations for the cache (defaults to + cacheDirectory / name). +--cache-compression Compression type used for the cache + files. +--no-cache-compression Negative 'cache-compression' option. +--cache-hash-algorithm Algorithm used for generation the hash + (see node.js crypto package). +--cache-idle-timeout Time in ms after which idle period the + cache storing should happen. +--cache-idle-timeout-after-large-changes Time in ms after which idle period the + cache storing should happen when + larger changes has been detected + (cumulative build time > 2 x avg cache + store time). +--cache-idle-timeout-for-initial-store Time in ms after which idle period the + initial cache storing should happen. +--cache-immutable-paths A RegExp matching an immutable + directory (usually a package manager + cache directory, including the tailing + slash) A path to an immutable + directory (usually a package manager + cache directory). +--cache-immutable-paths-reset Clear all items provided in + 'cache.immutablePaths' configuration. + List of paths that are managed by a + package manager and contain a version + or hash in its path so all files are + immutable. +--cache-managed-paths A RegExp matching a managed directory + (usually a node_modules directory, + including the tailing slash) A path to + a managed directory (usually a + node_modules directory). +--cache-managed-paths-reset Clear all items provided in + 'cache.managedPaths' configuration. + List of paths that are managed by a + package manager and can be trusted to + not be modified otherwise. +--cache-max-age Time for which unused cache entries + stay in the filesystem cache at + minimum (in milliseconds). +--cache-max-memory-generations Number of generations unused cache + entries stay in memory cache at + minimum (0 = no memory cache used, 1 = + may be removed after unused for a + single compilation, ..., Infinity: + kept forever). Cache entries will be + deserialized from disk when removed + from memory cache. +--cache-memory-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules in + memory. +--no-cache-memory-cache-unaffected Negative + 'cache-memory-cache-unaffected' + option. +--cache-name Name for the cache. Different names + will lead to different coexisting + caches. +--cache-profile Track and log detailed timing + information for individual cache + items. +--no-cache-profile Negative 'cache-profile' option. +--cache-readonly Enable/disable readonly mode. +--no-cache-readonly Negative 'cache-readonly' option. +--cache-store When to store data to the filesystem. + (pack: Store data when compiler is + idle in a single file). +--cache-version Version of the cache data. Different + versions won't allow to reuse the + cache and override existing content. + Update the version when config changed + in a way which doesn't allow to reuse + cache. This will invalidate the cache. +--context The base directory (absolute path!) + for resolving the \`entry\` option. If + \`output.pathinfo\` is set, the included + pathinfo is shortened to this + directory. +--dependencies References to another configuration to + depend on. +--dependencies-reset Clear all items provided in + 'dependencies' configuration. + References to other configurations to + depend on. +--no-dev-server Negative 'dev-server' option. +--devtool-type Which asset type should receive this + devtool value. +--devtool-use A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool-use Negative 'devtool-use' option. +--devtool-reset Clear all items provided in 'devtool' + configuration. A developer tool to + enhance debugging (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--dotenv Enable Dotenv plugin with default + options. +--no-dotenv Negative 'dotenv' option. +--dotenv-dir The directory from which .env files + are loaded. Can be an absolute path, + false will disable the .env file + loading. +--no-dotenv-dir Negative 'dotenv-dir' option. +--dotenv-prefix A prefix that environment variables + must start with to be exposed. +--dotenv-prefix-reset Clear all items provided in + 'dotenv.prefix' configuration. Only + expose environment variables that + start with these prefixes. Defaults to + 'WEBPACK_'. +--dotenv-template A template pattern for .env file + names. +--dotenv-template-reset Clear all items provided in + 'dotenv.template' configuration. + Template patterns for .env file names. + Use [mode] as placeholder for the + webpack mode. Defaults to ['.env', + '.env.local', '.env.[mode]', + '.env.[mode].local']. +--entry A module that is loaded upon startup. + Only the last one is exported. +--entry-reset Clear all items provided in 'entry' + configuration. All modules are loaded + upon startup. The last one is + exported. +--experiments-async-web-assembly Support WebAssembly as asynchronous + EcmaScript Module. +--no-experiments-async-web-assembly Negative + 'experiments-async-web-assembly' + option. +--experiments-back-compat Enable backward-compat layer with + deprecation warnings for many webpack + 4 APIs. +--no-experiments-back-compat Negative 'experiments-back-compat' + option. +--experiments-build-http-allowed-uris Allowed URI pattern. Allowed URI + (resp. the beginning of it). +--experiments-build-http-allowed-uris-reset Clear all items provided in + 'experiments.buildHttp.allowedUris' + configuration. List of allowed URIs + (resp. the beginning of them). +--experiments-build-http-cache-location Location where resource content is + stored for lockfile entries. It's also + possible to disable storing by passing + false. +--no-experiments-build-http-cache-location Negative + 'experiments-build-http-cache-location + ' option. +--experiments-build-http-frozen When set, anything that would lead to + a modification of the lockfile or any + resource content, will result in an + error. +--no-experiments-build-http-frozen Negative + 'experiments-build-http-frozen' + option. +--experiments-build-http-lockfile-location Location of the lockfile. +--experiments-build-http-proxy Proxy configuration, which can be used + to specify a proxy server to use for + HTTP requests. +--experiments-build-http-upgrade When set, resources of existing + lockfile entries will be fetched and + entries will be upgraded when resource + content has changed. +--no-experiments-build-http-upgrade Negative + 'experiments-build-http-upgrade' + option. +--experiments-cache-unaffected Enable additional in memory caching of + modules that are unchanged and + reference only unchanged modules. +--no-experiments-cache-unaffected Negative + 'experiments-cache-unaffected' option. +--experiments-css Enable css support. +--no-experiments-css Negative 'experiments-css' option. +--experiments-defer-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-defer + -import-eval. This allows to defer + execution of a module until it's first + use. +--no-experiments-defer-import Negative 'experiments-defer-import' + option. +--experiments-future-defaults Apply defaults of next major version. +--no-experiments-future-defaults Negative 'experiments-future-defaults' + option. +--experiments-lazy-compilation Compile entrypoints and import()s only + when they are accessed. +--no-experiments-lazy-compilation Negative + 'experiments-lazy-compilation' option. +--experiments-lazy-compilation-backend-client A custom client. +--experiments-lazy-compilation-backend-listen A port. +--experiments-lazy-compilation-backend-listen-host A host. +--experiments-lazy-compilation-backend-listen-port A port. +--experiments-lazy-compilation-backend-protocol Specifies the protocol the client + should use to connect to the server. +--experiments-lazy-compilation-entries Enable/disable lazy compilation for + entries. +--no-experiments-lazy-compilation-entries Negative + 'experiments-lazy-compilation-entries' + option. +--experiments-lazy-compilation-imports Enable/disable lazy compilation for + import() modules. +--no-experiments-lazy-compilation-imports Negative + 'experiments-lazy-compilation-imports' + option. +--experiments-lazy-compilation-test Specify which entrypoints or + import()ed modules should be lazily + compiled. This is matched with the + imported module and not the entrypoint + name. +--experiments-output-module Allow output javascript files as + module source type. +--no-experiments-output-module Negative 'experiments-output-module' + option. +--experiments-source-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-sourc + e-phase-imports. This allows importing + modules at stack. - --watch-options-poll [value] \`number\`: use polling with specified interval. \`true\`: use polling. - --no-watch-options-poll Negative 'watch-options-poll' 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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +--watch-options-poll [value] \`number\`: use polling with specified + interval. \`true\`: use polling. +--no-watch-options-poll Negative 'watch-options-poll' 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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'build' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'build' command using the "--help" option: stdout 1`] = ` -"Usage: webpack build|bundle|b [entries...] [options] - -Run webpack (default command, can be omitted). - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack (default command, can be omitted). + +Usage: webpack build|bundle|b [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'configtest' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'configtest' and respect the "--color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack configtest|t [config-path] +"Validate a webpack configuration. -Validate a webpack configuration. +Usage: webpack configtest|t [config-path] -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'configtest' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'configtest' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack configtest|t [config-path] +"Validate a webpack configuration. -Validate a webpack configuration. +Usage: webpack configtest|t [config-path] -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'configtest' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'configtest' command using command syntax: stdout 1`] = ` -"Usage: webpack configtest|t [config-path] +"Validate a webpack configuration. -Validate a webpack configuration. +Usage: webpack configtest|t [config-path] -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'configtest' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 'configtest' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack configtest|t [config-path] - -Validate a webpack configuration. +"Validate a webpack configuration. -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 other packages. - -h, --help [verbose] Display help for commands and options. +Usage: webpack configtest|t [config-path] -To see list of all supported commands and options run 'webpack --help=verbose'. +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 other packages. +-h, --help [verbose] Display help for commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'configtest' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'configtest' command using the "--help" option: stdout 1`] = ` -"Usage: webpack configtest|t [config-path] +"Validate a webpack configuration. -Validate a webpack configuration. +Usage: webpack configtest|t [config-path] -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'i' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'i' command using command syntax: stdout 1`] = ` -"Usage: webpack info|i [options] +"Outputs information about your system. -Outputs information about your system. +Usage: webpack info|i [options] -Options: - -o, --output To get the output in a specified format (accept json or markdown) - -a, --additional-package Adds additional packages to the output +Options +-o, --output To get the output in a specified format + (accept json or markdown) +-a, --additional-package Adds additional packages to the output -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'i' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 'i' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack info|i [options] - -Outputs information about your system. - -Options: - -o, --output To get the output in a specified format (accept json or markdown) - -a, --additional-package Adds additional packages to the output - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Outputs information about your system. + +Usage: webpack info|i [options] + +Options +-o, --output To get the output in a specified format + (accept json or markdown) +-a, --additional-package Adds additional packages to the output + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'i' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'i' command using the "--help" option: stdout 1`] = ` -"Usage: webpack info|i [options] +"Outputs information about your system. -Outputs information about your system. +Usage: webpack info|i [options] -Options: - -o, --output To get the output in a specified format (accept json or markdown) - -a, --additional-package Adds additional packages to the output +Options +-o, --output To get the output in a specified format + (accept json or markdown) +-a, --additional-package Adds additional packages to the output -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'info' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'info' and respect the "--color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack info|i [options] +"Outputs information about your system. -Outputs information about your system. +Usage: webpack info|i [options] -Options: - -o, --output To get the output in a specified format (accept json or markdown) - -a, --additional-package Adds additional packages to the output +Options +-o, --output To get the output in a specified format + (accept json or markdown) +-a, --additional-package Adds additional packages to the output -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'info' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'info' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack info|i [options] +"Outputs information about your system. -Outputs information about your system. +Usage: webpack info|i [options] -Options: - -o, --output To get the output in a specified format (accept json or markdown) - -a, --additional-package Adds additional packages to the output +Options +-o, --output To get the output in a specified format + (accept json or markdown) +-a, --additional-package Adds additional packages to the output -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'info' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'info' command using command syntax: stdout 1`] = ` -"Usage: webpack info|i [options] +"Outputs information about your system. -Outputs information about your system. +Usage: webpack info|i [options] -Options: - -o, --output To get the output in a specified format (accept json or markdown) - -a, --additional-package Adds additional packages to the output +Options +-o, --output To get the output in a specified format + (accept json or markdown) +-a, --additional-package Adds additional packages to the output -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'info' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 'info' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack info|i [options] - -Outputs information about your system. - -Options: - -o, --output To get the output in a specified format (accept json or markdown) - -a, --additional-package Adds additional packages to the output - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Outputs information about your system. + +Usage: webpack info|i [options] + +Options +-o, --output To get the output in a specified format + (accept json or markdown) +-a, --additional-package Adds additional packages to the output + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'info' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'info' command using the "--help" option: stdout 1`] = ` -"Usage: webpack info|i [options] +"Outputs information about your system. -Outputs information about your system. +Usage: webpack info|i [options] -Options: - -o, --output To get the output in a specified format (accept json or markdown) - -a, --additional-package Adds additional packages to the output +Options +-o, --output To get the output in a specified format + (accept json or markdown) +-a, --additional-package Adds additional packages to the output -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 's' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 's' command using command syntax: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - --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'). - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. 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'). - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. - --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start. - --no-client Disables client script. - --client-logging Allows to set log level in the browser. - --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. - --no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings. - --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. - --no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors. - --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings. - --no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings. - --client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors. - --no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors. - --client-overlay-trusted-types-policy-name The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'. - --client-progress [value] Displays compilation progress in the browser. Options include 'linear' and 'circular' for visual indicators. - --no-client-progress Does not display compilation progress in the browser. - --client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client. - --no-client-reconnect Tells dev-server to not to try to reconnect the client. - --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. - --client-web-socket-url Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to). - --client-web-socket-url-hostname Tells clients connected to devServer to use the provided hostname. - --client-web-socket-url-pathname Tells clients connected to devServer to use the provided path to connect. - --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. - --client-web-socket-url-port Tells clients connected to devServer to use the provided port. - --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. - --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. - --compress Enables gzip compression for everything served. - --no-compress Disables gzip compression for everything served. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. - --no-history-api-fallback Disallows to proxy requests through a specified index page. - --host Allows to specify a hostname to use. - --hot [value] Enables Hot Module Replacement. - --no-hot Disables Hot Module Replacement. - --ipc [value] Listen to a unix socket. - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). - --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default). - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --no-open Does not open the default browser. - --open-target Opens specified page in browser. - --open-app-name Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. - --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. - --server-type Allows to set server and options (by default 'http'). - --server-options-passphrase Passphrase for a pfx file. - --server-options-request-cert Request for an SSL certificate. - --no-server-options-request-cert Does not request for an SSL certificate. - --server-options-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-cert Path to an SSL certificate or content of an SSL certificate. - --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --server-options-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-crl-reset Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-key Path to an SSL key or content of an SSL key. - --server-options-key-reset Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key. - --server-options-pfx Path to an SSL pfx file or content of an SSL pfx file. - --server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). - --no-static Disallows to configure options for serving static files from directory. - --static-directory Directory for static contents. - --static-public-path The static files will be available in the browser under this public path. - --static-serve-index Tells dev server to use serveIndex middleware when enabled. - --no-static-serve-index Does not tell dev server to use serveIndex middleware. - --static-watch Watches for files in static content directory. - --no-static-watch Does not watch for files in static content directory. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). - --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. - --no-web-socket-server Disallows to set web socket server and options. - --web-socket-server-type Allows to set web socket server and options (by default 'ws'). - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on + file change. +--watch-options-stdin Stop watching when stdin stream has + ended. +--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'). +--allowed-hosts-reset Clear all items provided in + 'allowedHosts' configuration. 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'). +--bonjour Allows to broadcasts dev server via + ZeroConf networking on start. +--no-bonjour Disallows to broadcasts dev server via + ZeroConf networking on start. +--no-client Disables client script. +--client-logging Allows to set log level in the + browser. +--client-overlay Enables a full-screen overlay in the + browser when there are compiler errors + or warnings. +--no-client-overlay Disables the full-screen overlay in + the browser when there are compiler + errors or warnings. +--client-overlay-errors Enables a full-screen overlay in the + browser when there are compiler + errors. +--no-client-overlay-errors Disables the full-screen overlay in + the browser when there are compiler + errors. +--client-overlay-warnings Enables a full-screen overlay in the + browser when there are compiler + warnings. +--no-client-overlay-warnings Disables the full-screen overlay in + the browser when there are compiler + warnings. +--client-overlay-runtime-errors Enables a full-screen overlay in the + browser when there are uncaught + runtime errors. +--no-client-overlay-runtime-errors Disables the full-screen overlay in + the browser when there are uncaught + runtime errors. +--client-overlay-trusted-types-policy-name The name of a Trusted Types policy for + the overlay. Defaults to + 'webpack-dev-server#overlay'. +--client-progress [value] Displays compilation progress in the + browser. Options include 'linear' and + 'circular' for visual indicators. +--no-client-progress Does not display compilation progress + in the browser. +--client-reconnect [value] Tells dev-server the number of times + it should try to reconnect the client. +--no-client-reconnect Tells dev-server to not to try to + reconnect the client. +--client-web-socket-transport Allows to set custom web socket + transport to communicate with dev + server. +--client-web-socket-url Allows to specify URL to web socket + server (useful when you're proxying + dev server and client script does not + always know where to connect to). +--client-web-socket-url-hostname Tells clients connected to devServer + to use the provided hostname. +--client-web-socket-url-pathname Tells clients connected to devServer + to use the provided path to connect. +--client-web-socket-url-password Tells clients connected to devServer + to use the provided password to + authenticate. +--client-web-socket-url-port Tells clients connected to devServer + to use the provided port. +--client-web-socket-url-protocol Tells clients connected to devServer + to use the provided protocol. +--client-web-socket-url-username Tells clients connected to devServer + to use the provided username to + authenticate. +--compress Enables gzip compression for + everything served. +--no-compress Disables gzip compression for + everything served. +--history-api-fallback Allows to proxy requests through a + specified index page (by default + 'index.html'), useful for Single Page + Applications that utilise the HTML5 + History API. +--no-history-api-fallback Disallows to proxy requests through a + specified index page. +--host Allows to specify a hostname to use. +--hot [value] Enables Hot Module Replacement. +--no-hot Disables Hot Module Replacement. +--ipc [value] Listen to a unix socket. +--live-reload Enables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--no-live-reload Disables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--open [value...] Allows to configure dev server to open + the browser(s) and page(s) after + server had been started (set it to + true to open your default browser). +--no-open Does not open the default browser. +--open-target Opens specified page in browser. +--open-app-name Open specified browser. +--open-reset Clear all items provided in 'open' + configuration. Allows to configure dev + server to open the browser(s) and + page(s) after server had been started + (set it to true to open your default + browser). +--open-target-reset Clear all items provided in + 'open.target' configuration. Opens + specified page in browser. +--open-app-name-reset Clear all items provided in + 'open.app.name' configuration. Open + specified browser. +--port Allows to specify a port to use. +--server-type Allows to set server and options (by + default 'http'). +--server-options-passphrase Passphrase for a pfx file. +--server-options-request-cert Request for an SSL certificate. +--no-server-options-request-cert Does not request for an SSL + certificate. +--server-options-ca Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-ca-reset Clear all items provided in + 'server.options.ca' configuration. + Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-cert Path to an SSL certificate or content + of an SSL certificate. +--server-options-cert-reset Clear all items provided in + 'server.options.cert' configuration. + Path to an SSL certificate or content + of an SSL certificate. +--server-options-crl Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-crl-reset Clear all items provided in + 'server.options.crl' configuration. + Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-key Path to an SSL key or content of an + SSL key. +--server-options-key-reset Clear all items provided in + 'server.options.key' configuration. + Path to an SSL key or content of an + SSL key. +--server-options-pfx Path to an SSL pfx file or content of + an SSL pfx file. +--server-options-pfx-reset Clear all items provided in + 'server.options.pfx' configuration. + Path to an SSL pfx file or content of + an SSL pfx file. +--static [value...] Allows to configure options for + serving static files from directory + (by default 'public' directory). +--no-static Disallows to configure options for + serving static files from directory. +--static-directory Directory for static contents. +--static-public-path The static files will be available in + the browser under this public path. +--static-serve-index Tells dev server to use serveIndex + middleware when enabled. +--no-static-serve-index Does not tell dev server to use + serveIndex middleware. +--static-watch Watches for files in static content + directory. +--no-static-watch Does not watch for files in static + content directory. +--static-reset Clear all items provided in 'static' + configuration. Allows to configure + options for serving static files from + directory (by default 'public' + directory). +--static-public-path-reset Clear all items provided in + 'static.publicPath' configuration. The + static files will be available in the + browser under this public path. +--watch-files Allows to configure list of + globs/directories/files to watch for + file changes. +--watch-files-reset Clear all items provided in + 'watchFiles' configuration. Allows to + configure list of + globs/directories/files to watch for + file changes. +--no-web-socket-server Disallows to set web socket server and + options. +--web-socket-server-type Allows to set web socket server and + options (by default 'ws'). + +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 's' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 's' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - --no-amd Negative 'amd' option. - --bail Report the first error as a hard error instead of tolerating it. - --no-bail Negative 'bail' option. - --cache Enable in memory caching. Disable caching. - --no-cache Negative 'cache' option. - --cache-cache-unaffected Additionally cache computation of modules that are unchanged and reference only unchanged modules. - --no-cache-cache-unaffected Negative 'cache-cache-unaffected' option. - --cache-max-generations Number of generations unused cache entries stay in memory cache +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +--no-amd Negative 'amd' option. +--bail Report the first error as a hard error + instead of tolerating it. +--no-bail Negative 'bail' option. +--cache Enable in memory caching. Disable + caching. +--no-cache Negative 'cache' option. +--cache-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules. +--no-cache-cache-unaffected Negative 'cache-cache-unaffected' + option. +--cache-max-generations Number of generations unused cache + entries stay in memory cache at + minimum (1 = may be removed after + unused for a single compilation, ..., + Infinity: kept forever). +--cache-type In memory caching. Filesystem caching. +--cache-allow-collecting-memory Allows to collect unused memory + allocated during deserialization. This + requires copying data into smaller + buffers and has a performance cost. +--no-cache-allow-collecting-memory Negative + 'cache-allow-collecting-memory' + option. +--cache-cache-directory Base directory for the cache (defaults + to node_modules/.cache/webpack). +--cache-cache-location Locations for the cache (defaults to + cacheDirectory / name). +--cache-compression Compression type used for the cache + files. +--no-cache-compression Negative 'cache-compression' option. +--cache-hash-algorithm Algorithm used for generation the hash + (see node.js crypto package). +--cache-idle-timeout Time in ms after which idle period the + cache storing should happen. +--cache-idle-timeout-after-large-changes Time in ms after which idle period the + cache storing should happen when + larger changes has been detected + (cumulative build time > 2 x avg cache + store time). +--cache-idle-timeout-for-initial-store Time in ms after which idle period the + initial cache storing should happen. +--cache-immutable-paths A RegExp matching an immutable + directory (usually a package manager + cache directory, including the tailing + slash) A path to an immutable + directory (usually a package manager + cache directory). +--cache-immutable-paths-reset Clear all items provided in + 'cache.immutablePaths' configuration. + List of paths that are managed by a + package manager and contain a version + or hash in its path so all files are + immutable. +--cache-managed-paths A RegExp matching a managed directory + (usually a node_modules directory, + including the tailing slash) A path to + a managed directory (usually a + node_modules directory). +--cache-managed-paths-reset Clear all items provided in + 'cache.managedPaths' configuration. + List of paths that are managed by a + package manager and can be trusted to + not be modified otherwise. +--cache-max-age Time for which unused cache entries + stay in the filesystem cache at + minimum (in milliseconds). +--cache-max-memory-generations Number of generations unused cache + entries stay in memory cache at + minimum (0 = no memory cache used, 1 = + may be removed after unused for a + single compilation, ..., Infinity: + kept forever). Cache entries will be + deserialized from disk when removed + from memory cache. +--cache-memory-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules in + memory. +--no-cache-memory-cache-unaffected Negative + 'cache-memory-cache-unaffected' + option. +--cache-name Name for the cache. Different names + will lead to different coexisting + caches. +--cache-profile Track and log detailed timing + information for individual cache + items. +--no-cache-profile Negative 'cache-profile' option. +--cache-readonly Enable/disable readonly mode. +--no-cache-readonly Negative 'cache-readonly' option. +--cache-store When to store data to the filesystem. + (pack: Store data when compiler is + idle in a single file). +--cache-version Version of the cache data. Different + versions won't allow to reuse the + cache and override existing content. + Update the version when config changed + in a way which doesn't allow to reuse + cache. This will invalidate the cache. +--context The base directory (absolute path!) + for resolving the \`entry\` option. If + \`output.pathinfo\` is set, the included + pathinfo is shortened to this + directory. +--dependencies References to another configuration to + depend on. +--dependencies-reset Clear all items provided in + 'dependencies' configuration. + References to other configurations to + depend on. +--no-dev-server Negative 'dev-server' option. +--devtool-type Which asset type should receive this + devtool value. +--devtool-use A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool-use Negative 'devtool-use' option. +--devtool-reset Clear all items provided in 'devtool' + configuration. A developer tool to + enhance debugging (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--dotenv Enable Dotenv plugin with default + options. +--no-dotenv Negative 'dotenv' option. +--dotenv-dir The directory from which .env files + are loaded. Can be an absolute path, + false will disable the .env file + loading. +--no-dotenv-dir Negative 'dotenv-dir' option. +--dotenv-prefix A prefix that environment variables + must start with to be exposed. +--dotenv-prefix-reset Clear all items provided in + 'dotenv.prefix' configuration. Only + expose environment variables that + start with these prefixes. Defaults to + 'WEBPACK_'. +--dotenv-template A template pattern for .env file + names. +--dotenv-template-reset Clear all items provided in + 'dotenv.template' configuration. + Template patterns for .env file names. + Use [mode] as placeholder for the + webpack mode. Defaults to ['.env', + '.env.local', '.env.[mode]', + '.env.[mode].local']. +--entry A module that is loaded upon startup. + Only the last one is exported. +--entry-reset Clear all items provided in 'entry' + configuration. All modules are loaded + upon startup. The last one is + exported. +--experiments-async-web-assembly Support WebAssembly as asynchronous + EcmaScript Module. +--no-experiments-async-web-assembly Negative + 'experiments-async-web-assembly' + option. +--experiments-back-compat Enable backward-compat layer with + deprecation warnings for many webpack + 4 APIs. +--no-experiments-back-compat Negative 'experiments-back-compat' + option. +--experiments-build-http-allowed-uris Allowed URI pattern. Allowed URI + (resp. the beginning of it). +--experiments-build-http-allowed-uris-reset Clear all items provided in + 'experiments.buildHttp.allowedUris' + configuration. List of allowed URIs + (resp. the beginning of them). +--experiments-build-http-cache-location Location where resource content is + stored for lockfile entries. It's also + possible to disable storing by passing + false. +--no-experiments-build-http-cache-location Negative + 'experiments-build-http-cache-location + ' option. +--experiments-build-http-frozen When set, anything that would lead to + a modification of the lockfile or any + resource content, will result in an + error. +--no-experiments-build-http-frozen Negative + 'experiments-build-http-frozen' + option. +--experiments-build-http-lockfile-location Location of the lockfile. +--experiments-build-http-proxy Proxy configuration, which can be used + to specify a proxy server to use for + HTTP requests. +--experiments-build-http-upgrade When set, resources of existing + lockfile entries will be fetched and + entries will be upgraded when resource + content has changed. +--no-experiments-build-http-upgrade Negative + 'experiments-build-http-upgrade' + option. +--experiments-cache-unaffected Enable additional in memory caching of + modules that are unchanged and + reference only unchanged modules. +--no-experiments-cache-unaffected Negative + 'experiments-cache-unaffected' option. +--experiments-css Enable css support. +--no-experiments-css Negative 'experiments-css' option. +--experiments-defer-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-defer + -import-eval. This allows to defer + execution of a module until it's first + use. +--no-experiments-defer-import Negative 'experiments-defer-import' + option. +--experiments-future-defaults Apply defaults of next major version. +--no-experiments-future-defaults Negative 'experiments-future-defaults' + option. +--experiments-lazy-compilation Compile entrypoints and import()s only + when they are accessed. +--no-experiments-lazy-compilation Negative + 'experiments-lazy-compilation' option. +--experiments-lazy-compilation-backend-client A custom client. +--experiments-lazy-compilation-backend-listen A port. +--experiments-lazy-compilation-backend-listen-host A host. +--experiments-lazy-compilation-backend-listen-port A port. +--experiments-lazy-compilation-backend-protocol Specifies the protocol the client + should use to connect to the server. +--experiments-lazy-compilation-entries Enable/disable lazy compilation for + entries. +--no-experiments-lazy-compilation-entries Negative + 'experiments-lazy-compilation-entries' + option. +--experiments-lazy-compilation-imports Enable/disable lazy compilation for + import() modules. +--no-experiments-lazy-compilation-imports Negative + 'experiments-lazy-compilation-imports' + option. +--experiments-lazy-compilation-test Specify which entrypoints or + import()ed modules should be lazily + compiled. This is matched with the + imported module and not the entrypoint + name. +--experiments-output-module Allow output javascript files as + module source type. +--no-experiments-output-module Negative 'experiments-output-module' + option. +--experiments-source-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-sourc + e-phase-imports. This allows importing + modules at stack. -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 's' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 's' command using the "--help" option: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - --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'). - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. 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'). - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. - --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start. - --no-client Disables client script. - --client-logging Allows to set log level in the browser. - --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. - --no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings. - --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. - --no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors. - --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings. - --no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings. - --client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors. - --no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors. - --client-overlay-trusted-types-policy-name The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'. - --client-progress [value] Displays compilation progress in the browser. Options include 'linear' and 'circular' for visual indicators. - --no-client-progress Does not display compilation progress in the browser. - --client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client. - --no-client-reconnect Tells dev-server to not to try to reconnect the client. - --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. - --client-web-socket-url Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to). - --client-web-socket-url-hostname Tells clients connected to devServer to use the provided hostname. - --client-web-socket-url-pathname Tells clients connected to devServer to use the provided path to connect. - --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. - --client-web-socket-url-port Tells clients connected to devServer to use the provided port. - --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. - --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. - --compress Enables gzip compression for everything served. - --no-compress Disables gzip compression for everything served. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. - --no-history-api-fallback Disallows to proxy requests through a specified index page. - --host Allows to specify a hostname to use. - --hot [value] Enables Hot Module Replacement. - --no-hot Disables Hot Module Replacement. - --ipc [value] Listen to a unix socket. - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). - --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default). - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --no-open Does not open the default browser. - --open-target Opens specified page in browser. - --open-app-name Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. - --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. - --server-type Allows to set server and options (by default 'http'). - --server-options-passphrase Passphrase for a pfx file. - --server-options-request-cert Request for an SSL certificate. - --no-server-options-request-cert Does not request for an SSL certificate. - --server-options-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-cert Path to an SSL certificate or content of an SSL certificate. - --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --server-options-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-crl-reset Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-key Path to an SSL key or content of an SSL key. - --server-options-key-reset Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key. - --server-options-pfx Path to an SSL pfx file or content of an SSL pfx file. - --server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). - --no-static Disallows to configure options for serving static files from directory. - --static-directory Directory for static contents. - --static-public-path The static files will be available in the browser under this public path. - --static-serve-index Tells dev server to use serveIndex middleware when enabled. - --no-static-serve-index Does not tell dev server to use serveIndex middleware. - --static-watch Watches for files in static content directory. - --no-static-watch Does not watch for files in static content directory. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). - --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. - --no-web-socket-server Disallows to set web socket server and options. - --web-socket-server-type Allows to set web socket server and options (by default 'ws'). - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on + file change. +--watch-options-stdin Stop watching when stdin stream has + ended. +--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'). +--allowed-hosts-reset Clear all items provided in + 'allowedHosts' configuration. 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'). +--bonjour Allows to broadcasts dev server via + ZeroConf networking on start. +--no-bonjour Disallows to broadcasts dev server via + ZeroConf networking on start. +--no-client Disables client script. +--client-logging Allows to set log level in the + browser. +--client-overlay Enables a full-screen overlay in the + browser when there are compiler errors + or warnings. +--no-client-overlay Disables the full-screen overlay in + the browser when there are compiler + errors or warnings. +--client-overlay-errors Enables a full-screen overlay in the + browser when there are compiler + errors. +--no-client-overlay-errors Disables the full-screen overlay in + the browser when there are compiler + errors. +--client-overlay-warnings Enables a full-screen overlay in the + browser when there are compiler + warnings. +--no-client-overlay-warnings Disables the full-screen overlay in + the browser when there are compiler + warnings. +--client-overlay-runtime-errors Enables a full-screen overlay in the + browser when there are uncaught + runtime errors. +--no-client-overlay-runtime-errors Disables the full-screen overlay in + the browser when there are uncaught + runtime errors. +--client-overlay-trusted-types-policy-name The name of a Trusted Types policy for + the overlay. Defaults to + 'webpack-dev-server#overlay'. +--client-progress [value] Displays compilation progress in the + browser. Options include 'linear' and + 'circular' for visual indicators. +--no-client-progress Does not display compilation progress + in the browser. +--client-reconnect [value] Tells dev-server the number of times + it should try to reconnect the client. +--no-client-reconnect Tells dev-server to not to try to + reconnect the client. +--client-web-socket-transport Allows to set custom web socket + transport to communicate with dev + server. +--client-web-socket-url Allows to specify URL to web socket + server (useful when you're proxying + dev server and client script does not + always know where to connect to). +--client-web-socket-url-hostname Tells clients connected to devServer + to use the provided hostname. +--client-web-socket-url-pathname Tells clients connected to devServer + to use the provided path to connect. +--client-web-socket-url-password Tells clients connected to devServer + to use the provided password to + authenticate. +--client-web-socket-url-port Tells clients connected to devServer + to use the provided port. +--client-web-socket-url-protocol Tells clients connected to devServer + to use the provided protocol. +--client-web-socket-url-username Tells clients connected to devServer + to use the provided username to + authenticate. +--compress Enables gzip compression for + everything served. +--no-compress Disables gzip compression for + everything served. +--history-api-fallback Allows to proxy requests through a + specified index page (by default + 'index.html'), useful for Single Page + Applications that utilise the HTML5 + History API. +--no-history-api-fallback Disallows to proxy requests through a + specified index page. +--host Allows to specify a hostname to use. +--hot [value] Enables Hot Module Replacement. +--no-hot Disables Hot Module Replacement. +--ipc [value] Listen to a unix socket. +--live-reload Enables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--no-live-reload Disables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--open [value...] Allows to configure dev server to open + the browser(s) and page(s) after + server had been started (set it to + true to open your default browser). +--no-open Does not open the default browser. +--open-target Opens specified page in browser. +--open-app-name Open specified browser. +--open-reset Clear all items provided in 'open' + configuration. Allows to configure dev + server to open the browser(s) and + page(s) after server had been started + (set it to true to open your default + browser). +--open-target-reset Clear all items provided in + 'open.target' configuration. Opens + specified page in browser. +--open-app-name-reset Clear all items provided in + 'open.app.name' configuration. Open + specified browser. +--port Allows to specify a port to use. +--server-type Allows to set server and options (by + default 'http'). +--server-options-passphrase Passphrase for a pfx file. +--server-options-request-cert Request for an SSL certificate. +--no-server-options-request-cert Does not request for an SSL + certificate. +--server-options-ca Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-ca-reset Clear all items provided in + 'server.options.ca' configuration. + Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-cert Path to an SSL certificate or content + of an SSL certificate. +--server-options-cert-reset Clear all items provided in + 'server.options.cert' configuration. + Path to an SSL certificate or content + of an SSL certificate. +--server-options-crl Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-crl-reset Clear all items provided in + 'server.options.crl' configuration. + Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-key Path to an SSL key or content of an + SSL key. +--server-options-key-reset Clear all items provided in + 'server.options.key' configuration. + Path to an SSL key or content of an + SSL key. +--server-options-pfx Path to an SSL pfx file or content of + an SSL pfx file. +--server-options-pfx-reset Clear all items provided in + 'server.options.pfx' configuration. + Path to an SSL pfx file or content of + an SSL pfx file. +--static [value...] Allows to configure options for + serving static files from directory + (by default 'public' directory). +--no-static Disallows to configure options for + serving static files from directory. +--static-directory Directory for static contents. +--static-public-path The static files will be available in + the browser under this public path. +--static-serve-index Tells dev server to use serveIndex + middleware when enabled. +--no-static-serve-index Does not tell dev server to use + serveIndex middleware. +--static-watch Watches for files in static content + directory. +--no-static-watch Does not watch for files in static + content directory. +--static-reset Clear all items provided in 'static' + configuration. Allows to configure + options for serving static files from + directory (by default 'public' + directory). +--static-public-path-reset Clear all items provided in + 'static.publicPath' configuration. The + static files will be available in the + browser under this public path. +--watch-files Allows to configure list of + globs/directories/files to watch for + file changes. +--watch-files-reset Clear all items provided in + 'watchFiles' configuration. Allows to + configure list of + globs/directories/files to watch for + file changes. +--no-web-socket-server Disallows to set web socket server and + options. +--web-socket-server-type Allows to set web socket server and + options (by default 'ws'). + +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'serve' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'serve' and respect the "--color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - --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'). - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. 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'). - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. - --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start. - --no-client Disables client script. - --client-logging Allows to set log level in the browser. - --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. - --no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings. - --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. - --no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors. - --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings. - --no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings. - --client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors. - --no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors. - --client-overlay-trusted-types-policy-name The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'. - --client-progress [value] Displays compilation progress in the browser. Options include 'linear' and 'circular' for visual indicators. - --no-client-progress Does not display compilation progress in the browser. - --client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client. - --no-client-reconnect Tells dev-server to not to try to reconnect the client. - --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. - --client-web-socket-url Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to). - --client-web-socket-url-hostname Tells clients connected to devServer to use the provided hostname. - --client-web-socket-url-pathname Tells clients connected to devServer to use the provided path to connect. - --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. - --client-web-socket-url-port Tells clients connected to devServer to use the provided port. - --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. - --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. - --compress Enables gzip compression for everything served. - --no-compress Disables gzip compression for everything served. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. - --no-history-api-fallback Disallows to proxy requests through a specified index page. - --host Allows to specify a hostname to use. - --hot [value] Enables Hot Module Replacement. - --no-hot Disables Hot Module Replacement. - --ipc [value] Listen to a unix socket. - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). - --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default). - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --no-open Does not open the default browser. - --open-target Opens specified page in browser. - --open-app-name Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. - --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. - --server-type Allows to set server and options (by default 'http'). - --server-options-passphrase Passphrase for a pfx file. - --server-options-request-cert Request for an SSL certificate. - --no-server-options-request-cert Does not request for an SSL certificate. - --server-options-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-cert Path to an SSL certificate or content of an SSL certificate. - --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --server-options-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-crl-reset Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-key Path to an SSL key or content of an SSL key. - --server-options-key-reset Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key. - --server-options-pfx Path to an SSL pfx file or content of an SSL pfx file. - --server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). - --no-static Disallows to configure options for serving static files from directory. - --static-directory Directory for static contents. - --static-public-path The static files will be available in the browser under this public path. - --static-serve-index Tells dev server to use serveIndex middleware when enabled. - --no-static-serve-index Does not tell dev server to use serveIndex middleware. - --static-watch Watches for files in static content directory. - --no-static-watch Does not watch for files in static content directory. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). - --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. - --no-web-socket-server Disallows to set web socket server and options. - --web-socket-server-type Allows to set web socket server and options (by default 'ws'). - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on + file change. +--watch-options-stdin Stop watching when stdin stream has + ended. +--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'). +--allowed-hosts-reset Clear all items provided in + 'allowedHosts' configuration. 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'). +--bonjour Allows to broadcasts dev server via + ZeroConf networking on start. +--no-bonjour Disallows to broadcasts dev server via + ZeroConf networking on start. +--no-client Disables client script. +--client-logging Allows to set log level in the + browser. +--client-overlay Enables a full-screen overlay in the + browser when there are compiler errors + or warnings. +--no-client-overlay Disables the full-screen overlay in + the browser when there are compiler + errors or warnings. +--client-overlay-errors Enables a full-screen overlay in the + browser when there are compiler + errors. +--no-client-overlay-errors Disables the full-screen overlay in + the browser when there are compiler + errors. +--client-overlay-warnings Enables a full-screen overlay in the + browser when there are compiler + warnings. +--no-client-overlay-warnings Disables the full-screen overlay in + the browser when there are compiler + warnings. +--client-overlay-runtime-errors Enables a full-screen overlay in the + browser when there are uncaught + runtime errors. +--no-client-overlay-runtime-errors Disables the full-screen overlay in + the browser when there are uncaught + runtime errors. +--client-overlay-trusted-types-policy-name The name of a Trusted Types policy for + the overlay. Defaults to + 'webpack-dev-server#overlay'. +--client-progress [value] Displays compilation progress in the + browser. Options include 'linear' and + 'circular' for visual indicators. +--no-client-progress Does not display compilation progress + in the browser. +--client-reconnect [value] Tells dev-server the number of times + it should try to reconnect the client. +--no-client-reconnect Tells dev-server to not to try to + reconnect the client. +--client-web-socket-transport Allows to set custom web socket + transport to communicate with dev + server. +--client-web-socket-url Allows to specify URL to web socket + server (useful when you're proxying + dev server and client script does not + always know where to connect to). +--client-web-socket-url-hostname Tells clients connected to devServer + to use the provided hostname. +--client-web-socket-url-pathname Tells clients connected to devServer + to use the provided path to connect. +--client-web-socket-url-password Tells clients connected to devServer + to use the provided password to + authenticate. +--client-web-socket-url-port Tells clients connected to devServer + to use the provided port. +--client-web-socket-url-protocol Tells clients connected to devServer + to use the provided protocol. +--client-web-socket-url-username Tells clients connected to devServer + to use the provided username to + authenticate. +--compress Enables gzip compression for + everything served. +--no-compress Disables gzip compression for + everything served. +--history-api-fallback Allows to proxy requests through a + specified index page (by default + 'index.html'), useful for Single Page + Applications that utilise the HTML5 + History API. +--no-history-api-fallback Disallows to proxy requests through a + specified index page. +--host Allows to specify a hostname to use. +--hot [value] Enables Hot Module Replacement. +--no-hot Disables Hot Module Replacement. +--ipc [value] Listen to a unix socket. +--live-reload Enables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--no-live-reload Disables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--open [value...] Allows to configure dev server to open + the browser(s) and page(s) after + server had been started (set it to + true to open your default browser). +--no-open Does not open the default browser. +--open-target Opens specified page in browser. +--open-app-name Open specified browser. +--open-reset Clear all items provided in 'open' + configuration. Allows to configure dev + server to open the browser(s) and + page(s) after server had been started + (set it to true to open your default + browser). +--open-target-reset Clear all items provided in + 'open.target' configuration. Opens + specified page in browser. +--open-app-name-reset Clear all items provided in + 'open.app.name' configuration. Open + specified browser. +--port Allows to specify a port to use. +--server-type Allows to set server and options (by + default 'http'). +--server-options-passphrase Passphrase for a pfx file. +--server-options-request-cert Request for an SSL certificate. +--no-server-options-request-cert Does not request for an SSL + certificate. +--server-options-ca Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-ca-reset Clear all items provided in + 'server.options.ca' configuration. + Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-cert Path to an SSL certificate or content + of an SSL certificate. +--server-options-cert-reset Clear all items provided in + 'server.options.cert' configuration. + Path to an SSL certificate or content + of an SSL certificate. +--server-options-crl Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-crl-reset Clear all items provided in + 'server.options.crl' configuration. + Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-key Path to an SSL key or content of an + SSL key. +--server-options-key-reset Clear all items provided in + 'server.options.key' configuration. + Path to an SSL key or content of an + SSL key. +--server-options-pfx Path to an SSL pfx file or content of + an SSL pfx file. +--server-options-pfx-reset Clear all items provided in + 'server.options.pfx' configuration. + Path to an SSL pfx file or content of + an SSL pfx file. +--static [value...] Allows to configure options for + serving static files from directory + (by default 'public' directory). +--no-static Disallows to configure options for + serving static files from directory. +--static-directory Directory for static contents. +--static-public-path The static files will be available in + the browser under this public path. +--static-serve-index Tells dev server to use serveIndex + middleware when enabled. +--no-static-serve-index Does not tell dev server to use + serveIndex middleware. +--static-watch Watches for files in static content + directory. +--no-static-watch Does not watch for files in static + content directory. +--static-reset Clear all items provided in 'static' + configuration. Allows to configure + options for serving static files from + directory (by default 'public' + directory). +--static-public-path-reset Clear all items provided in + 'static.publicPath' configuration. The + static files will be available in the + browser under this public path. +--watch-files Allows to configure list of + globs/directories/files to watch for + file changes. +--watch-files-reset Clear all items provided in + 'watchFiles' configuration. Allows to + configure list of + globs/directories/files to watch for + file changes. +--no-web-socket-server Disallows to set web socket server and + options. +--web-socket-server-type Allows to set web socket server and + options (by default 'ws'). + +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'serve' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'serve' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - --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'). - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. 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'). - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. - --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start. - --no-client Disables client script. - --client-logging Allows to set log level in the browser. - --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. - --no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings. - --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. - --no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors. - --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings. - --no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings. - --client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors. - --no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors. - --client-overlay-trusted-types-policy-name The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'. - --client-progress [value] Displays compilation progress in the browser. Options include 'linear' and 'circular' for visual indicators. - --no-client-progress Does not display compilation progress in the browser. - --client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client. - --no-client-reconnect Tells dev-server to not to try to reconnect the client. - --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. - --client-web-socket-url Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to). - --client-web-socket-url-hostname Tells clients connected to devServer to use the provided hostname. - --client-web-socket-url-pathname Tells clients connected to devServer to use the provided path to connect. - --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. - --client-web-socket-url-port Tells clients connected to devServer to use the provided port. - --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. - --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. - --compress Enables gzip compression for everything served. - --no-compress Disables gzip compression for everything served. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. - --no-history-api-fallback Disallows to proxy requests through a specified index page. - --host Allows to specify a hostname to use. - --hot [value] Enables Hot Module Replacement. - --no-hot Disables Hot Module Replacement. - --ipc [value] Listen to a unix socket. - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). - --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default). - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --no-open Does not open the default browser. - --open-target Opens specified page in browser. - --open-app-name Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. - --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. - --server-type Allows to set server and options (by default 'http'). - --server-options-passphrase Passphrase for a pfx file. - --server-options-request-cert Request for an SSL certificate. - --no-server-options-request-cert Does not request for an SSL certificate. - --server-options-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-cert Path to an SSL certificate or content of an SSL certificate. - --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --server-options-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-crl-reset Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-key Path to an SSL key or content of an SSL key. - --server-options-key-reset Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key. - --server-options-pfx Path to an SSL pfx file or content of an SSL pfx file. - --server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). - --no-static Disallows to configure options for serving static files from directory. - --static-directory Directory for static contents. - --static-public-path The static files will be available in the browser under this public path. - --static-serve-index Tells dev server to use serveIndex middleware when enabled. - --no-static-serve-index Does not tell dev server to use serveIndex middleware. - --static-watch Watches for files in static content directory. - --no-static-watch Does not watch for files in static content directory. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). - --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. - --no-web-socket-server Disallows to set web socket server and options. - --web-socket-server-type Allows to set web socket server and options (by default 'ws'). - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on + file change. +--watch-options-stdin Stop watching when stdin stream has + ended. +--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'). +--allowed-hosts-reset Clear all items provided in + 'allowedHosts' configuration. 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'). +--bonjour Allows to broadcasts dev server via + ZeroConf networking on start. +--no-bonjour Disallows to broadcasts dev server via + ZeroConf networking on start. +--no-client Disables client script. +--client-logging Allows to set log level in the + browser. +--client-overlay Enables a full-screen overlay in the + browser when there are compiler errors + or warnings. +--no-client-overlay Disables the full-screen overlay in + the browser when there are compiler + errors or warnings. +--client-overlay-errors Enables a full-screen overlay in the + browser when there are compiler + errors. +--no-client-overlay-errors Disables the full-screen overlay in + the browser when there are compiler + errors. +--client-overlay-warnings Enables a full-screen overlay in the + browser when there are compiler + warnings. +--no-client-overlay-warnings Disables the full-screen overlay in + the browser when there are compiler + warnings. +--client-overlay-runtime-errors Enables a full-screen overlay in the + browser when there are uncaught + runtime errors. +--no-client-overlay-runtime-errors Disables the full-screen overlay in + the browser when there are uncaught + runtime errors. +--client-overlay-trusted-types-policy-name The name of a Trusted Types policy for + the overlay. Defaults to + 'webpack-dev-server#overlay'. +--client-progress [value] Displays compilation progress in the + browser. Options include 'linear' and + 'circular' for visual indicators. +--no-client-progress Does not display compilation progress + in the browser. +--client-reconnect [value] Tells dev-server the number of times + it should try to reconnect the client. +--no-client-reconnect Tells dev-server to not to try to + reconnect the client. +--client-web-socket-transport Allows to set custom web socket + transport to communicate with dev + server. +--client-web-socket-url Allows to specify URL to web socket + server (useful when you're proxying + dev server and client script does not + always know where to connect to). +--client-web-socket-url-hostname Tells clients connected to devServer + to use the provided hostname. +--client-web-socket-url-pathname Tells clients connected to devServer + to use the provided path to connect. +--client-web-socket-url-password Tells clients connected to devServer + to use the provided password to + authenticate. +--client-web-socket-url-port Tells clients connected to devServer + to use the provided port. +--client-web-socket-url-protocol Tells clients connected to devServer + to use the provided protocol. +--client-web-socket-url-username Tells clients connected to devServer + to use the provided username to + authenticate. +--compress Enables gzip compression for + everything served. +--no-compress Disables gzip compression for + everything served. +--history-api-fallback Allows to proxy requests through a + specified index page (by default + 'index.html'), useful for Single Page + Applications that utilise the HTML5 + History API. +--no-history-api-fallback Disallows to proxy requests through a + specified index page. +--host Allows to specify a hostname to use. +--hot [value] Enables Hot Module Replacement. +--no-hot Disables Hot Module Replacement. +--ipc [value] Listen to a unix socket. +--live-reload Enables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--no-live-reload Disables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--open [value...] Allows to configure dev server to open + the browser(s) and page(s) after + server had been started (set it to + true to open your default browser). +--no-open Does not open the default browser. +--open-target Opens specified page in browser. +--open-app-name Open specified browser. +--open-reset Clear all items provided in 'open' + configuration. Allows to configure dev + server to open the browser(s) and + page(s) after server had been started + (set it to true to open your default + browser). +--open-target-reset Clear all items provided in + 'open.target' configuration. Opens + specified page in browser. +--open-app-name-reset Clear all items provided in + 'open.app.name' configuration. Open + specified browser. +--port Allows to specify a port to use. +--server-type Allows to set server and options (by + default 'http'). +--server-options-passphrase Passphrase for a pfx file. +--server-options-request-cert Request for an SSL certificate. +--no-server-options-request-cert Does not request for an SSL + certificate. +--server-options-ca Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-ca-reset Clear all items provided in + 'server.options.ca' configuration. + Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-cert Path to an SSL certificate or content + of an SSL certificate. +--server-options-cert-reset Clear all items provided in + 'server.options.cert' configuration. + Path to an SSL certificate or content + of an SSL certificate. +--server-options-crl Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-crl-reset Clear all items provided in + 'server.options.crl' configuration. + Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-key Path to an SSL key or content of an + SSL key. +--server-options-key-reset Clear all items provided in + 'server.options.key' configuration. + Path to an SSL key or content of an + SSL key. +--server-options-pfx Path to an SSL pfx file or content of + an SSL pfx file. +--server-options-pfx-reset Clear all items provided in + 'server.options.pfx' configuration. + Path to an SSL pfx file or content of + an SSL pfx file. +--static [value...] Allows to configure options for + serving static files from directory + (by default 'public' directory). +--no-static Disallows to configure options for + serving static files from directory. +--static-directory Directory for static contents. +--static-public-path The static files will be available in + the browser under this public path. +--static-serve-index Tells dev server to use serveIndex + middleware when enabled. +--no-static-serve-index Does not tell dev server to use + serveIndex middleware. +--static-watch Watches for files in static content + directory. +--no-static-watch Does not watch for files in static + content directory. +--static-reset Clear all items provided in 'static' + configuration. Allows to configure + options for serving static files from + directory (by default 'public' + directory). +--static-public-path-reset Clear all items provided in + 'static.publicPath' configuration. The + static files will be available in the + browser under this public path. +--watch-files Allows to configure list of + globs/directories/files to watch for + file changes. +--watch-files-reset Clear all items provided in + 'watchFiles' configuration. Allows to + configure list of + globs/directories/files to watch for + file changes. +--no-web-socket-server Disallows to set web socket server and + options. +--web-socket-server-type Allows to set web socket server and + options (by default 'ws'). + +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'serve' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'serve' command using command syntax: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - --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'). - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. 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'). - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. - --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start. - --no-client Disables client script. - --client-logging Allows to set log level in the browser. - --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. - --no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings. - --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. - --no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors. - --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings. - --no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings. - --client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors. - --no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors. - --client-overlay-trusted-types-policy-name The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'. - --client-progress [value] Displays compilation progress in the browser. Options include 'linear' and 'circular' for visual indicators. - --no-client-progress Does not display compilation progress in the browser. - --client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client. - --no-client-reconnect Tells dev-server to not to try to reconnect the client. - --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. - --client-web-socket-url Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to). - --client-web-socket-url-hostname Tells clients connected to devServer to use the provided hostname. - --client-web-socket-url-pathname Tells clients connected to devServer to use the provided path to connect. - --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. - --client-web-socket-url-port Tells clients connected to devServer to use the provided port. - --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. - --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. - --compress Enables gzip compression for everything served. - --no-compress Disables gzip compression for everything served. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. - --no-history-api-fallback Disallows to proxy requests through a specified index page. - --host Allows to specify a hostname to use. - --hot [value] Enables Hot Module Replacement. - --no-hot Disables Hot Module Replacement. - --ipc [value] Listen to a unix socket. - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). - --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default). - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --no-open Does not open the default browser. - --open-target Opens specified page in browser. - --open-app-name Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. - --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. - --server-type Allows to set server and options (by default 'http'). - --server-options-passphrase Passphrase for a pfx file. - --server-options-request-cert Request for an SSL certificate. - --no-server-options-request-cert Does not request for an SSL certificate. - --server-options-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-cert Path to an SSL certificate or content of an SSL certificate. - --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --server-options-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-crl-reset Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-key Path to an SSL key or content of an SSL key. - --server-options-key-reset Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key. - --server-options-pfx Path to an SSL pfx file or content of an SSL pfx file. - --server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). - --no-static Disallows to configure options for serving static files from directory. - --static-directory Directory for static contents. - --static-public-path The static files will be available in the browser under this public path. - --static-serve-index Tells dev server to use serveIndex middleware when enabled. - --no-static-serve-index Does not tell dev server to use serveIndex middleware. - --static-watch Watches for files in static content directory. - --no-static-watch Does not watch for files in static content directory. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). - --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. - --no-web-socket-server Disallows to set web socket server and options. - --web-socket-server-type Allows to set web socket server and options (by default 'ws'). - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on + file change. +--watch-options-stdin Stop watching when stdin stream has + ended. +--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'). +--allowed-hosts-reset Clear all items provided in + 'allowedHosts' configuration. 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'). +--bonjour Allows to broadcasts dev server via + ZeroConf networking on start. +--no-bonjour Disallows to broadcasts dev server via + ZeroConf networking on start. +--no-client Disables client script. +--client-logging Allows to set log level in the + browser. +--client-overlay Enables a full-screen overlay in the + browser when there are compiler errors + or warnings. +--no-client-overlay Disables the full-screen overlay in + the browser when there are compiler + errors or warnings. +--client-overlay-errors Enables a full-screen overlay in the + browser when there are compiler + errors. +--no-client-overlay-errors Disables the full-screen overlay in + the browser when there are compiler + errors. +--client-overlay-warnings Enables a full-screen overlay in the + browser when there are compiler + warnings. +--no-client-overlay-warnings Disables the full-screen overlay in + the browser when there are compiler + warnings. +--client-overlay-runtime-errors Enables a full-screen overlay in the + browser when there are uncaught + runtime errors. +--no-client-overlay-runtime-errors Disables the full-screen overlay in + the browser when there are uncaught + runtime errors. +--client-overlay-trusted-types-policy-name The name of a Trusted Types policy for + the overlay. Defaults to + 'webpack-dev-server#overlay'. +--client-progress [value] Displays compilation progress in the + browser. Options include 'linear' and + 'circular' for visual indicators. +--no-client-progress Does not display compilation progress + in the browser. +--client-reconnect [value] Tells dev-server the number of times + it should try to reconnect the client. +--no-client-reconnect Tells dev-server to not to try to + reconnect the client. +--client-web-socket-transport Allows to set custom web socket + transport to communicate with dev + server. +--client-web-socket-url Allows to specify URL to web socket + server (useful when you're proxying + dev server and client script does not + always know where to connect to). +--client-web-socket-url-hostname Tells clients connected to devServer + to use the provided hostname. +--client-web-socket-url-pathname Tells clients connected to devServer + to use the provided path to connect. +--client-web-socket-url-password Tells clients connected to devServer + to use the provided password to + authenticate. +--client-web-socket-url-port Tells clients connected to devServer + to use the provided port. +--client-web-socket-url-protocol Tells clients connected to devServer + to use the provided protocol. +--client-web-socket-url-username Tells clients connected to devServer + to use the provided username to + authenticate. +--compress Enables gzip compression for + everything served. +--no-compress Disables gzip compression for + everything served. +--history-api-fallback Allows to proxy requests through a + specified index page (by default + 'index.html'), useful for Single Page + Applications that utilise the HTML5 + History API. +--no-history-api-fallback Disallows to proxy requests through a + specified index page. +--host Allows to specify a hostname to use. +--hot [value] Enables Hot Module Replacement. +--no-hot Disables Hot Module Replacement. +--ipc [value] Listen to a unix socket. +--live-reload Enables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--no-live-reload Disables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--open [value...] Allows to configure dev server to open + the browser(s) and page(s) after + server had been started (set it to + true to open your default browser). +--no-open Does not open the default browser. +--open-target Opens specified page in browser. +--open-app-name Open specified browser. +--open-reset Clear all items provided in 'open' + configuration. Allows to configure dev + server to open the browser(s) and + page(s) after server had been started + (set it to true to open your default + browser). +--open-target-reset Clear all items provided in + 'open.target' configuration. Opens + specified page in browser. +--open-app-name-reset Clear all items provided in + 'open.app.name' configuration. Open + specified browser. +--port Allows to specify a port to use. +--server-type Allows to set server and options (by + default 'http'). +--server-options-passphrase Passphrase for a pfx file. +--server-options-request-cert Request for an SSL certificate. +--no-server-options-request-cert Does not request for an SSL + certificate. +--server-options-ca Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-ca-reset Clear all items provided in + 'server.options.ca' configuration. + Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-cert Path to an SSL certificate or content + of an SSL certificate. +--server-options-cert-reset Clear all items provided in + 'server.options.cert' configuration. + Path to an SSL certificate or content + of an SSL certificate. +--server-options-crl Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-crl-reset Clear all items provided in + 'server.options.crl' configuration. + Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-key Path to an SSL key or content of an + SSL key. +--server-options-key-reset Clear all items provided in + 'server.options.key' configuration. + Path to an SSL key or content of an + SSL key. +--server-options-pfx Path to an SSL pfx file or content of + an SSL pfx file. +--server-options-pfx-reset Clear all items provided in + 'server.options.pfx' configuration. + Path to an SSL pfx file or content of + an SSL pfx file. +--static [value...] Allows to configure options for + serving static files from directory + (by default 'public' directory). +--no-static Disallows to configure options for + serving static files from directory. +--static-directory Directory for static contents. +--static-public-path The static files will be available in + the browser under this public path. +--static-serve-index Tells dev server to use serveIndex + middleware when enabled. +--no-static-serve-index Does not tell dev server to use + serveIndex middleware. +--static-watch Watches for files in static content + directory. +--no-static-watch Does not watch for files in static + content directory. +--static-reset Clear all items provided in 'static' + configuration. Allows to configure + options for serving static files from + directory (by default 'public' + directory). +--static-public-path-reset Clear all items provided in + 'static.publicPath' configuration. The + static files will be available in the + browser under this public path. +--watch-files Allows to configure list of + globs/directories/files to watch for + file changes. +--watch-files-reset Clear all items provided in + 'watchFiles' configuration. Allows to + configure list of + globs/directories/files to watch for + file changes. +--no-web-socket-server Disallows to set web socket server and + options. +--web-socket-server-type Allows to set web socket server and + options (by default 'ws'). + +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'serve' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 'serve' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - --no-amd Negative 'amd' option. - --bail Report the first error as a hard error instead of tolerating it. - --no-bail Negative 'bail' option. - --cache Enable in memory caching. Disable caching. - --no-cache Negative 'cache' option. - --cache-cache-unaffected Additionally cache computation of modules that are unchanged and reference only unchanged modules. - --no-cache-cache-unaffected Negative 'cache-cache-unaffected' option. - --cache-max-generations Number of generations unused cache entries stay in memory cache +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +--no-amd Negative 'amd' option. +--bail Report the first error as a hard error + instead of tolerating it. +--no-bail Negative 'bail' option. +--cache Enable in memory caching. Disable + caching. +--no-cache Negative 'cache' option. +--cache-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules. +--no-cache-cache-unaffected Negative 'cache-cache-unaffected' + option. +--cache-max-generations Number of generations unused cache + entries stay in memory cache at + minimum (1 = may be removed after + unused for a single compilation, ..., + Infinity: kept forever). +--cache-type In memory caching. Filesystem caching. +--cache-allow-collecting-memory Allows to collect unused memory + allocated during deserialization. This + requires copying data into smaller + buffers and has a performance cost. +--no-cache-allow-collecting-memory Negative + 'cache-allow-collecting-memory' + option. +--cache-cache-directory Base directory for the cache (defaults + to node_modules/.cache/webpack). +--cache-cache-location Locations for the cache (defaults to + cacheDirectory / name). +--cache-compression Compression type used for the cache + files. +--no-cache-compression Negative 'cache-compression' option. +--cache-hash-algorithm Algorithm used for generation the hash + (see node.js crypto package). +--cache-idle-timeout Time in ms after which idle period the + cache storing should happen. +--cache-idle-timeout-after-large-changes Time in ms after which idle period the + cache storing should happen when + larger changes has been detected + (cumulative build time > 2 x avg cache + store time). +--cache-idle-timeout-for-initial-store Time in ms after which idle period the + initial cache storing should happen. +--cache-immutable-paths A RegExp matching an immutable + directory (usually a package manager + cache directory, including the tailing + slash) A path to an immutable + directory (usually a package manager + cache directory). +--cache-immutable-paths-reset Clear all items provided in + 'cache.immutablePaths' configuration. + List of paths that are managed by a + package manager and contain a version + or hash in its path so all files are + immutable. +--cache-managed-paths A RegExp matching a managed directory + (usually a node_modules directory, + including the tailing slash) A path to + a managed directory (usually a + node_modules directory). +--cache-managed-paths-reset Clear all items provided in + 'cache.managedPaths' configuration. + List of paths that are managed by a + package manager and can be trusted to + not be modified otherwise. +--cache-max-age Time for which unused cache entries + stay in the filesystem cache at + minimum (in milliseconds). +--cache-max-memory-generations Number of generations unused cache + entries stay in memory cache at + minimum (0 = no memory cache used, 1 = + may be removed after unused for a + single compilation, ..., Infinity: + kept forever). Cache entries will be + deserialized from disk when removed + from memory cache. +--cache-memory-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules in + memory. +--no-cache-memory-cache-unaffected Negative + 'cache-memory-cache-unaffected' + option. +--cache-name Name for the cache. Different names + will lead to different coexisting + caches. +--cache-profile Track and log detailed timing + information for individual cache + items. +--no-cache-profile Negative 'cache-profile' option. +--cache-readonly Enable/disable readonly mode. +--no-cache-readonly Negative 'cache-readonly' option. +--cache-store When to store data to the filesystem. + (pack: Store data when compiler is + idle in a single file). +--cache-version Version of the cache data. Different + versions won't allow to reuse the + cache and override existing content. + Update the version when config changed + in a way which doesn't allow to reuse + cache. This will invalidate the cache. +--context The base directory (absolute path!) + for resolving the \`entry\` option. If + \`output.pathinfo\` is set, the included + pathinfo is shortened to this + directory. +--dependencies References to another configuration to + depend on. +--dependencies-reset Clear all items provided in + 'dependencies' configuration. + References to other configurations to + depend on. +--no-dev-server Negative 'dev-server' option. +--devtool-type Which asset type should receive this + devtool value. +--devtool-use A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool-use Negative 'devtool-use' option. +--devtool-reset Clear all items provided in 'devtool' + configuration. A developer tool to + enhance debugging (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--dotenv Enable Dotenv plugin with default + options. +--no-dotenv Negative 'dotenv' option. +--dotenv-dir The directory from which .env files + are loaded. Can be an absolute path, + false will disable the .env file + loading. +--no-dotenv-dir Negative 'dotenv-dir' option. +--dotenv-prefix A prefix that environment variables + must start with to be exposed. +--dotenv-prefix-reset Clear all items provided in + 'dotenv.prefix' configuration. Only + expose environment variables that + start with these prefixes. Defaults to + 'WEBPACK_'. +--dotenv-template A template pattern for .env file + names. +--dotenv-template-reset Clear all items provided in + 'dotenv.template' configuration. + Template patterns for .env file names. + Use [mode] as placeholder for the + webpack mode. Defaults to ['.env', + '.env.local', '.env.[mode]', + '.env.[mode].local']. +--entry A module that is loaded upon startup. + Only the last one is exported. +--entry-reset Clear all items provided in 'entry' + configuration. All modules are loaded + upon startup. The last one is + exported. +--experiments-async-web-assembly Support WebAssembly as asynchronous + EcmaScript Module. +--no-experiments-async-web-assembly Negative + 'experiments-async-web-assembly' + option. +--experiments-back-compat Enable backward-compat layer with + deprecation warnings for many webpack + 4 APIs. +--no-experiments-back-compat Negative 'experiments-back-compat' + option. +--experiments-build-http-allowed-uris Allowed URI pattern. Allowed URI + (resp. the beginning of it). +--experiments-build-http-allowed-uris-reset Clear all items provided in + 'experiments.buildHttp.allowedUris' + configuration. List of allowed URIs + (resp. the beginning of them). +--experiments-build-http-cache-location Location where resource content is + stored for lockfile entries. It's also + possible to disable storing by passing + false. +--no-experiments-build-http-cache-location Negative + 'experiments-build-http-cache-location + ' option. +--experiments-build-http-frozen When set, anything that would lead to + a modification of the lockfile or any + resource content, will result in an + error. +--no-experiments-build-http-frozen Negative + 'experiments-build-http-frozen' + option. +--experiments-build-http-lockfile-location Location of the lockfile. +--experiments-build-http-proxy Proxy configuration, which can be used + to specify a proxy server to use for + HTTP requests. +--experiments-build-http-upgrade When set, resources of existing + lockfile entries will be fetched and + entries will be upgraded when resource + content has changed. +--no-experiments-build-http-upgrade Negative + 'experiments-build-http-upgrade' + option. +--experiments-cache-unaffected Enable additional in memory caching of + modules that are unchanged and + reference only unchanged modules. +--no-experiments-cache-unaffected Negative + 'experiments-cache-unaffected' option. +--experiments-css Enable css support. +--no-experiments-css Negative 'experiments-css' option. +--experiments-defer-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-defer + -import-eval. This allows to defer + execution of a module until it's first + use. +--no-experiments-defer-import Negative 'experiments-defer-import' + option. +--experiments-future-defaults Apply defaults of next major version. +--no-experiments-future-defaults Negative 'experiments-future-defaults' + option. +--experiments-lazy-compilation Compile entrypoints and import()s only + when they are accessed. +--no-experiments-lazy-compilation Negative + 'experiments-lazy-compilation' option. +--experiments-lazy-compilation-backend-client A custom client. +--experiments-lazy-compilation-backend-listen A port. +--experiments-lazy-compilation-backend-listen-host A host. +--experiments-lazy-compilation-backend-listen-port A port. +--experiments-lazy-compilation-backend-protocol Specifies the protocol the client + should use to connect to the server. +--experiments-lazy-compilation-entries Enable/disable lazy compilation for + entries. +--no-experiments-lazy-compilation-entries Negative + 'experiments-lazy-compilation-entries' + option. +--experiments-lazy-compilation-imports Enable/disable lazy compilation for + import() modules. +--no-experiments-lazy-compilation-imports Negative + 'experiments-lazy-compilation-imports' + option. +--experiments-lazy-compilation-test Specify which entrypoints or + import()ed modules should be lazily + compiled. This is matched with the + imported module and not the entrypoint + name. +--experiments-output-module Allow output javascript files as + module source type. +--no-experiments-output-module Negative 'experiments-output-module' + option. +--experiments-source-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-sourc + e-phase-imports. This allows importing + modules at stack. -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'serve' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'serve' command using the "--help" option: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - --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'). - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. 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'). - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. - --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start. - --no-client Disables client script. - --client-logging Allows to set log level in the browser. - --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. - --no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings. - --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. - --no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors. - --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings. - --no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings. - --client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors. - --no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors. - --client-overlay-trusted-types-policy-name The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'. - --client-progress [value] Displays compilation progress in the browser. Options include 'linear' and 'circular' for visual indicators. - --no-client-progress Does not display compilation progress in the browser. - --client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client. - --no-client-reconnect Tells dev-server to not to try to reconnect the client. - --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. - --client-web-socket-url Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to). - --client-web-socket-url-hostname Tells clients connected to devServer to use the provided hostname. - --client-web-socket-url-pathname Tells clients connected to devServer to use the provided path to connect. - --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. - --client-web-socket-url-port Tells clients connected to devServer to use the provided port. - --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. - --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. - --compress Enables gzip compression for everything served. - --no-compress Disables gzip compression for everything served. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. - --no-history-api-fallback Disallows to proxy requests through a specified index page. - --host Allows to specify a hostname to use. - --hot [value] Enables Hot Module Replacement. - --no-hot Disables Hot Module Replacement. - --ipc [value] Listen to a unix socket. - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). - --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default). - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --no-open Does not open the default browser. - --open-target Opens specified page in browser. - --open-app-name Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. - --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. - --server-type Allows to set server and options (by default 'http'). - --server-options-passphrase Passphrase for a pfx file. - --server-options-request-cert Request for an SSL certificate. - --no-server-options-request-cert Does not request for an SSL certificate. - --server-options-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-cert Path to an SSL certificate or content of an SSL certificate. - --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --server-options-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-crl-reset Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-key Path to an SSL key or content of an SSL key. - --server-options-key-reset Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key. - --server-options-pfx Path to an SSL pfx file or content of an SSL pfx file. - --server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). - --no-static Disallows to configure options for serving static files from directory. - --static-directory Directory for static contents. - --static-public-path The static files will be available in the browser under this public path. - --static-serve-index Tells dev server to use serveIndex middleware when enabled. - --no-static-serve-index Does not tell dev server to use serveIndex middleware. - --static-watch Watches for files in static content directory. - --no-static-watch Does not watch for files in static content directory. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). - --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. - --no-web-socket-server Disallows to set web socket server and options. - --web-socket-server-type Allows to set web socket server and options (by default 'ws'). - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on + file change. +--watch-options-stdin Stop watching when stdin stream has + ended. +--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'). +--allowed-hosts-reset Clear all items provided in + 'allowedHosts' configuration. 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'). +--bonjour Allows to broadcasts dev server via + ZeroConf networking on start. +--no-bonjour Disallows to broadcasts dev server via + ZeroConf networking on start. +--no-client Disables client script. +--client-logging Allows to set log level in the + browser. +--client-overlay Enables a full-screen overlay in the + browser when there are compiler errors + or warnings. +--no-client-overlay Disables the full-screen overlay in + the browser when there are compiler + errors or warnings. +--client-overlay-errors Enables a full-screen overlay in the + browser when there are compiler + errors. +--no-client-overlay-errors Disables the full-screen overlay in + the browser when there are compiler + errors. +--client-overlay-warnings Enables a full-screen overlay in the + browser when there are compiler + warnings. +--no-client-overlay-warnings Disables the full-screen overlay in + the browser when there are compiler + warnings. +--client-overlay-runtime-errors Enables a full-screen overlay in the + browser when there are uncaught + runtime errors. +--no-client-overlay-runtime-errors Disables the full-screen overlay in + the browser when there are uncaught + runtime errors. +--client-overlay-trusted-types-policy-name The name of a Trusted Types policy for + the overlay. Defaults to + 'webpack-dev-server#overlay'. +--client-progress [value] Displays compilation progress in the + browser. Options include 'linear' and + 'circular' for visual indicators. +--no-client-progress Does not display compilation progress + in the browser. +--client-reconnect [value] Tells dev-server the number of times + it should try to reconnect the client. +--no-client-reconnect Tells dev-server to not to try to + reconnect the client. +--client-web-socket-transport Allows to set custom web socket + transport to communicate with dev + server. +--client-web-socket-url Allows to specify URL to web socket + server (useful when you're proxying + dev server and client script does not + always know where to connect to). +--client-web-socket-url-hostname Tells clients connected to devServer + to use the provided hostname. +--client-web-socket-url-pathname Tells clients connected to devServer + to use the provided path to connect. +--client-web-socket-url-password Tells clients connected to devServer + to use the provided password to + authenticate. +--client-web-socket-url-port Tells clients connected to devServer + to use the provided port. +--client-web-socket-url-protocol Tells clients connected to devServer + to use the provided protocol. +--client-web-socket-url-username Tells clients connected to devServer + to use the provided username to + authenticate. +--compress Enables gzip compression for + everything served. +--no-compress Disables gzip compression for + everything served. +--history-api-fallback Allows to proxy requests through a + specified index page (by default + 'index.html'), useful for Single Page + Applications that utilise the HTML5 + History API. +--no-history-api-fallback Disallows to proxy requests through a + specified index page. +--host Allows to specify a hostname to use. +--hot [value] Enables Hot Module Replacement. +--no-hot Disables Hot Module Replacement. +--ipc [value] Listen to a unix socket. +--live-reload Enables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--no-live-reload Disables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--open [value...] Allows to configure dev server to open + the browser(s) and page(s) after + server had been started (set it to + true to open your default browser). +--no-open Does not open the default browser. +--open-target Opens specified page in browser. +--open-app-name Open specified browser. +--open-reset Clear all items provided in 'open' + configuration. Allows to configure dev + server to open the browser(s) and + page(s) after server had been started + (set it to true to open your default + browser). +--open-target-reset Clear all items provided in + 'open.target' configuration. Opens + specified page in browser. +--open-app-name-reset Clear all items provided in + 'open.app.name' configuration. Open + specified browser. +--port Allows to specify a port to use. +--server-type Allows to set server and options (by + default 'http'). +--server-options-passphrase Passphrase for a pfx file. +--server-options-request-cert Request for an SSL certificate. +--no-server-options-request-cert Does not request for an SSL + certificate. +--server-options-ca Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-ca-reset Clear all items provided in + 'server.options.ca' configuration. + Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-cert Path to an SSL certificate or content + of an SSL certificate. +--server-options-cert-reset Clear all items provided in + 'server.options.cert' configuration. + Path to an SSL certificate or content + of an SSL certificate. +--server-options-crl Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-crl-reset Clear all items provided in + 'server.options.crl' configuration. + Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-key Path to an SSL key or content of an + SSL key. +--server-options-key-reset Clear all items provided in + 'server.options.key' configuration. + Path to an SSL key or content of an + SSL key. +--server-options-pfx Path to an SSL pfx file or content of + an SSL pfx file. +--server-options-pfx-reset Clear all items provided in + 'server.options.pfx' configuration. + Path to an SSL pfx file or content of + an SSL pfx file. +--static [value...] Allows to configure options for + serving static files from directory + (by default 'public' directory). +--no-static Disallows to configure options for + serving static files from directory. +--static-directory Directory for static contents. +--static-public-path The static files will be available in + the browser under this public path. +--static-serve-index Tells dev server to use serveIndex + middleware when enabled. +--no-static-serve-index Does not tell dev server to use + serveIndex middleware. +--static-watch Watches for files in static content + directory. +--no-static-watch Does not watch for files in static + content directory. +--static-reset Clear all items provided in 'static' + configuration. Allows to configure + options for serving static files from + directory (by default 'public' + directory). +--static-public-path-reset Clear all items provided in + 'static.publicPath' configuration. The + static files will be available in the + browser under this public path. +--watch-files Allows to configure list of + globs/directories/files to watch for + file changes. +--watch-files-reset Clear all items provided in + 'watchFiles' configuration. Allows to + configure list of + globs/directories/files to watch for + file changes. +--no-web-socket-server Disallows to set web socket server and + options. +--web-socket-server-type Allows to set web socket server and + options (by default 'ws'). + +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'server' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'server' command using command syntax: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - --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'). - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. 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'). - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. - --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start. - --no-client Disables client script. - --client-logging Allows to set log level in the browser. - --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. - --no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings. - --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. - --no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors. - --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings. - --no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings. - --client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors. - --no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors. - --client-overlay-trusted-types-policy-name The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'. - --client-progress [value] Displays compilation progress in the browser. Options include 'linear' and 'circular' for visual indicators. - --no-client-progress Does not display compilation progress in the browser. - --client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client. - --no-client-reconnect Tells dev-server to not to try to reconnect the client. - --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. - --client-web-socket-url Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to). - --client-web-socket-url-hostname Tells clients connected to devServer to use the provided hostname. - --client-web-socket-url-pathname Tells clients connected to devServer to use the provided path to connect. - --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. - --client-web-socket-url-port Tells clients connected to devServer to use the provided port. - --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. - --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. - --compress Enables gzip compression for everything served. - --no-compress Disables gzip compression for everything served. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. - --no-history-api-fallback Disallows to proxy requests through a specified index page. - --host Allows to specify a hostname to use. - --hot [value] Enables Hot Module Replacement. - --no-hot Disables Hot Module Replacement. - --ipc [value] Listen to a unix socket. - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). - --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default). - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --no-open Does not open the default browser. - --open-target Opens specified page in browser. - --open-app-name Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. - --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. - --server-type Allows to set server and options (by default 'http'). - --server-options-passphrase Passphrase for a pfx file. - --server-options-request-cert Request for an SSL certificate. - --no-server-options-request-cert Does not request for an SSL certificate. - --server-options-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-cert Path to an SSL certificate or content of an SSL certificate. - --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --server-options-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-crl-reset Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-key Path to an SSL key or content of an SSL key. - --server-options-key-reset Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key. - --server-options-pfx Path to an SSL pfx file or content of an SSL pfx file. - --server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). - --no-static Disallows to configure options for serving static files from directory. - --static-directory Directory for static contents. - --static-public-path The static files will be available in the browser under this public path. - --static-serve-index Tells dev server to use serveIndex middleware when enabled. - --no-static-serve-index Does not tell dev server to use serveIndex middleware. - --static-watch Watches for files in static content directory. - --no-static-watch Does not watch for files in static content directory. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). - --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. - --no-web-socket-server Disallows to set web socket server and options. - --web-socket-server-type Allows to set web socket server and options (by default 'ws'). - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on + file change. +--watch-options-stdin Stop watching when stdin stream has + ended. +--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'). +--allowed-hosts-reset Clear all items provided in + 'allowedHosts' configuration. 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'). +--bonjour Allows to broadcasts dev server via + ZeroConf networking on start. +--no-bonjour Disallows to broadcasts dev server via + ZeroConf networking on start. +--no-client Disables client script. +--client-logging Allows to set log level in the + browser. +--client-overlay Enables a full-screen overlay in the + browser when there are compiler errors + or warnings. +--no-client-overlay Disables the full-screen overlay in + the browser when there are compiler + errors or warnings. +--client-overlay-errors Enables a full-screen overlay in the + browser when there are compiler + errors. +--no-client-overlay-errors Disables the full-screen overlay in + the browser when there are compiler + errors. +--client-overlay-warnings Enables a full-screen overlay in the + browser when there are compiler + warnings. +--no-client-overlay-warnings Disables the full-screen overlay in + the browser when there are compiler + warnings. +--client-overlay-runtime-errors Enables a full-screen overlay in the + browser when there are uncaught + runtime errors. +--no-client-overlay-runtime-errors Disables the full-screen overlay in + the browser when there are uncaught + runtime errors. +--client-overlay-trusted-types-policy-name The name of a Trusted Types policy for + the overlay. Defaults to + 'webpack-dev-server#overlay'. +--client-progress [value] Displays compilation progress in the + browser. Options include 'linear' and + 'circular' for visual indicators. +--no-client-progress Does not display compilation progress + in the browser. +--client-reconnect [value] Tells dev-server the number of times + it should try to reconnect the client. +--no-client-reconnect Tells dev-server to not to try to + reconnect the client. +--client-web-socket-transport Allows to set custom web socket + transport to communicate with dev + server. +--client-web-socket-url Allows to specify URL to web socket + server (useful when you're proxying + dev server and client script does not + always know where to connect to). +--client-web-socket-url-hostname Tells clients connected to devServer + to use the provided hostname. +--client-web-socket-url-pathname Tells clients connected to devServer + to use the provided path to connect. +--client-web-socket-url-password Tells clients connected to devServer + to use the provided password to + authenticate. +--client-web-socket-url-port Tells clients connected to devServer + to use the provided port. +--client-web-socket-url-protocol Tells clients connected to devServer + to use the provided protocol. +--client-web-socket-url-username Tells clients connected to devServer + to use the provided username to + authenticate. +--compress Enables gzip compression for + everything served. +--no-compress Disables gzip compression for + everything served. +--history-api-fallback Allows to proxy requests through a + specified index page (by default + 'index.html'), useful for Single Page + Applications that utilise the HTML5 + History API. +--no-history-api-fallback Disallows to proxy requests through a + specified index page. +--host Allows to specify a hostname to use. +--hot [value] Enables Hot Module Replacement. +--no-hot Disables Hot Module Replacement. +--ipc [value] Listen to a unix socket. +--live-reload Enables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--no-live-reload Disables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--open [value...] Allows to configure dev server to open + the browser(s) and page(s) after + server had been started (set it to + true to open your default browser). +--no-open Does not open the default browser. +--open-target Opens specified page in browser. +--open-app-name Open specified browser. +--open-reset Clear all items provided in 'open' + configuration. Allows to configure dev + server to open the browser(s) and + page(s) after server had been started + (set it to true to open your default + browser). +--open-target-reset Clear all items provided in + 'open.target' configuration. Opens + specified page in browser. +--open-app-name-reset Clear all items provided in + 'open.app.name' configuration. Open + specified browser. +--port Allows to specify a port to use. +--server-type Allows to set server and options (by + default 'http'). +--server-options-passphrase Passphrase for a pfx file. +--server-options-request-cert Request for an SSL certificate. +--no-server-options-request-cert Does not request for an SSL + certificate. +--server-options-ca Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-ca-reset Clear all items provided in + 'server.options.ca' configuration. + Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-cert Path to an SSL certificate or content + of an SSL certificate. +--server-options-cert-reset Clear all items provided in + 'server.options.cert' configuration. + Path to an SSL certificate or content + of an SSL certificate. +--server-options-crl Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-crl-reset Clear all items provided in + 'server.options.crl' configuration. + Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-key Path to an SSL key or content of an + SSL key. +--server-options-key-reset Clear all items provided in + 'server.options.key' configuration. + Path to an SSL key or content of an + SSL key. +--server-options-pfx Path to an SSL pfx file or content of + an SSL pfx file. +--server-options-pfx-reset Clear all items provided in + 'server.options.pfx' configuration. + Path to an SSL pfx file or content of + an SSL pfx file. +--static [value...] Allows to configure options for + serving static files from directory + (by default 'public' directory). +--no-static Disallows to configure options for + serving static files from directory. +--static-directory Directory for static contents. +--static-public-path The static files will be available in + the browser under this public path. +--static-serve-index Tells dev server to use serveIndex + middleware when enabled. +--no-static-serve-index Does not tell dev server to use + serveIndex middleware. +--static-watch Watches for files in static content + directory. +--no-static-watch Does not watch for files in static + content directory. +--static-reset Clear all items provided in 'static' + configuration. Allows to configure + options for serving static files from + directory (by default 'public' + directory). +--static-public-path-reset Clear all items provided in + 'static.publicPath' configuration. The + static files will be available in the + browser under this public path. +--watch-files Allows to configure list of + globs/directories/files to watch for + file changes. +--watch-files-reset Clear all items provided in + 'watchFiles' configuration. Allows to + configure list of + globs/directories/files to watch for + file changes. +--no-web-socket-server Disallows to set web socket server and + options. +--web-socket-server-type Allows to set web socket server and + options (by default 'ws'). + +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'server' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 'server' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - --no-amd Negative 'amd' option. - --bail Report the first error as a hard error instead of tolerating it. - --no-bail Negative 'bail' option. - --cache Enable in memory caching. Disable caching. - --no-cache Negative 'cache' option. - --cache-cache-unaffected Additionally cache computation of modules that are unchanged and reference only unchanged modules. - --no-cache-cache-unaffected Negative 'cache-cache-unaffected' option. - --cache-max-generations Number of generations unused cache entries stay in memory cache +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +--no-amd Negative 'amd' option. +--bail Report the first error as a hard error + instead of tolerating it. +--no-bail Negative 'bail' option. +--cache Enable in memory caching. Disable + caching. +--no-cache Negative 'cache' option. +--cache-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules. +--no-cache-cache-unaffected Negative 'cache-cache-unaffected' + option. +--cache-max-generations Number of generations unused cache + entries stay in memory cache at + minimum (1 = may be removed after + unused for a single compilation, ..., + Infinity: kept forever). +--cache-type In memory caching. Filesystem caching. +--cache-allow-collecting-memory Allows to collect unused memory + allocated during deserialization. This + requires copying data into smaller + buffers and has a performance cost. +--no-cache-allow-collecting-memory Negative + 'cache-allow-collecting-memory' + option. +--cache-cache-directory Base directory for the cache (defaults + to node_modules/.cache/webpack). +--cache-cache-location Locations for the cache (defaults to + cacheDirectory / name). +--cache-compression Compression type used for the cache + files. +--no-cache-compression Negative 'cache-compression' option. +--cache-hash-algorithm Algorithm used for generation the hash + (see node.js crypto package). +--cache-idle-timeout Time in ms after which idle period the + cache storing should happen. +--cache-idle-timeout-after-large-changes Time in ms after which idle period the + cache storing should happen when + larger changes has been detected + (cumulative build time > 2 x avg cache + store time). +--cache-idle-timeout-for-initial-store Time in ms after which idle period the + initial cache storing should happen. +--cache-immutable-paths A RegExp matching an immutable + directory (usually a package manager + cache directory, including the tailing + slash) A path to an immutable + directory (usually a package manager + cache directory). +--cache-immutable-paths-reset Clear all items provided in + 'cache.immutablePaths' configuration. + List of paths that are managed by a + package manager and contain a version + or hash in its path so all files are + immutable. +--cache-managed-paths A RegExp matching a managed directory + (usually a node_modules directory, + including the tailing slash) A path to + a managed directory (usually a + node_modules directory). +--cache-managed-paths-reset Clear all items provided in + 'cache.managedPaths' configuration. + List of paths that are managed by a + package manager and can be trusted to + not be modified otherwise. +--cache-max-age Time for which unused cache entries + stay in the filesystem cache at + minimum (in milliseconds). +--cache-max-memory-generations Number of generations unused cache + entries stay in memory cache at + minimum (0 = no memory cache used, 1 = + may be removed after unused for a + single compilation, ..., Infinity: + kept forever). Cache entries will be + deserialized from disk when removed + from memory cache. +--cache-memory-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules in + memory. +--no-cache-memory-cache-unaffected Negative + 'cache-memory-cache-unaffected' + option. +--cache-name Name for the cache. Different names + will lead to different coexisting + caches. +--cache-profile Track and log detailed timing + information for individual cache + items. +--no-cache-profile Negative 'cache-profile' option. +--cache-readonly Enable/disable readonly mode. +--no-cache-readonly Negative 'cache-readonly' option. +--cache-store When to store data to the filesystem. + (pack: Store data when compiler is + idle in a single file). +--cache-version Version of the cache data. Different + versions won't allow to reuse the + cache and override existing content. + Update the version when config changed + in a way which doesn't allow to reuse + cache. This will invalidate the cache. +--context The base directory (absolute path!) + for resolving the \`entry\` option. If + \`output.pathinfo\` is set, the included + pathinfo is shortened to this + directory. +--dependencies References to another configuration to + depend on. +--dependencies-reset Clear all items provided in + 'dependencies' configuration. + References to other configurations to + depend on. +--no-dev-server Negative 'dev-server' option. +--devtool-type Which asset type should receive this + devtool value. +--devtool-use A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool-use Negative 'devtool-use' option. +--devtool-reset Clear all items provided in 'devtool' + configuration. A developer tool to + enhance debugging (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--dotenv Enable Dotenv plugin with default + options. +--no-dotenv Negative 'dotenv' option. +--dotenv-dir The directory from which .env files + are loaded. Can be an absolute path, + false will disable the .env file + loading. +--no-dotenv-dir Negative 'dotenv-dir' option. +--dotenv-prefix A prefix that environment variables + must start with to be exposed. +--dotenv-prefix-reset Clear all items provided in + 'dotenv.prefix' configuration. Only + expose environment variables that + start with these prefixes. Defaults to + 'WEBPACK_'. +--dotenv-template A template pattern for .env file + names. +--dotenv-template-reset Clear all items provided in + 'dotenv.template' configuration. + Template patterns for .env file names. + Use [mode] as placeholder for the + webpack mode. Defaults to ['.env', + '.env.local', '.env.[mode]', + '.env.[mode].local']. +--entry A module that is loaded upon startup. + Only the last one is exported. +--entry-reset Clear all items provided in 'entry' + configuration. All modules are loaded + upon startup. The last one is + exported. +--experiments-async-web-assembly Support WebAssembly as asynchronous + EcmaScript Module. +--no-experiments-async-web-assembly Negative + 'experiments-async-web-assembly' + option. +--experiments-back-compat Enable backward-compat layer with + deprecation warnings for many webpack + 4 APIs. +--no-experiments-back-compat Negative 'experiments-back-compat' + option. +--experiments-build-http-allowed-uris Allowed URI pattern. Allowed URI + (resp. the beginning of it). +--experiments-build-http-allowed-uris-reset Clear all items provided in + 'experiments.buildHttp.allowedUris' + configuration. List of allowed URIs + (resp. the beginning of them). +--experiments-build-http-cache-location Location where resource content is + stored for lockfile entries. It's also + possible to disable storing by passing + false. +--no-experiments-build-http-cache-location Negative + 'experiments-build-http-cache-location + ' option. +--experiments-build-http-frozen When set, anything that would lead to + a modification of the lockfile or any + resource content, will result in an + error. +--no-experiments-build-http-frozen Negative + 'experiments-build-http-frozen' + option. +--experiments-build-http-lockfile-location Location of the lockfile. +--experiments-build-http-proxy Proxy configuration, which can be used + to specify a proxy server to use for + HTTP requests. +--experiments-build-http-upgrade When set, resources of existing + lockfile entries will be fetched and + entries will be upgraded when resource + content has changed. +--no-experiments-build-http-upgrade Negative + 'experiments-build-http-upgrade' + option. +--experiments-cache-unaffected Enable additional in memory caching of + modules that are unchanged and + reference only unchanged modules. +--no-experiments-cache-unaffected Negative + 'experiments-cache-unaffected' option. +--experiments-css Enable css support. +--no-experiments-css Negative 'experiments-css' option. +--experiments-defer-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-defer + -import-eval. This allows to defer + execution of a module until it's first + use. +--no-experiments-defer-import Negative 'experiments-defer-import' + option. +--experiments-future-defaults Apply defaults of next major version. +--no-experiments-future-defaults Negative 'experiments-future-defaults' + option. +--experiments-lazy-compilation Compile entrypoints and import()s only + when they are accessed. +--no-experiments-lazy-compilation Negative + 'experiments-lazy-compilation' option. +--experiments-lazy-compilation-backend-client A custom client. +--experiments-lazy-compilation-backend-listen A port. +--experiments-lazy-compilation-backend-listen-host A host. +--experiments-lazy-compilation-backend-listen-port A port. +--experiments-lazy-compilation-backend-protocol Specifies the protocol the client + should use to connect to the server. +--experiments-lazy-compilation-entries Enable/disable lazy compilation for + entries. +--no-experiments-lazy-compilation-entries Negative + 'experiments-lazy-compilation-entries' + option. +--experiments-lazy-compilation-imports Enable/disable lazy compilation for + import() modules. +--no-experiments-lazy-compilation-imports Negative + 'experiments-lazy-compilation-imports' + option. +--experiments-lazy-compilation-test Specify which entrypoints or + import()ed modules should be lazily + compiled. This is matched with the + imported module and not the entrypoint + name. +--experiments-output-module Allow output javascript files as + module source type. +--no-experiments-output-module Negative 'experiments-output-module' + option. +--experiments-source-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-sourc + e-phase-imports. This allows importing + modules at stack. -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'server' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'server' command using the "--help" option: stdout 1`] = ` -"Usage: webpack serve|server|s [entries...] [options] - -Run the webpack dev server and watch for source file changes while serving. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. - --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'). - --allowed-hosts-reset Clear all items provided in 'allowedHosts' configuration. 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'). - --bonjour Allows to broadcasts dev server via ZeroConf networking on start. - --no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start. - --no-client Disables client script. - --client-logging Allows to set log level in the browser. - --client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings. - --no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings. - --client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors. - --no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors. - --client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings. - --no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings. - --client-overlay-runtime-errors Enables a full-screen overlay in the browser when there are uncaught runtime errors. - --no-client-overlay-runtime-errors Disables the full-screen overlay in the browser when there are uncaught runtime errors. - --client-overlay-trusted-types-policy-name The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'. - --client-progress [value] Displays compilation progress in the browser. Options include 'linear' and 'circular' for visual indicators. - --no-client-progress Does not display compilation progress in the browser. - --client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client. - --no-client-reconnect Tells dev-server to not to try to reconnect the client. - --client-web-socket-transport Allows to set custom web socket transport to communicate with dev server. - --client-web-socket-url Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to). - --client-web-socket-url-hostname Tells clients connected to devServer to use the provided hostname. - --client-web-socket-url-pathname Tells clients connected to devServer to use the provided path to connect. - --client-web-socket-url-password Tells clients connected to devServer to use the provided password to authenticate. - --client-web-socket-url-port Tells clients connected to devServer to use the provided port. - --client-web-socket-url-protocol Tells clients connected to devServer to use the provided protocol. - --client-web-socket-url-username Tells clients connected to devServer to use the provided username to authenticate. - --compress Enables gzip compression for everything served. - --no-compress Disables gzip compression for everything served. - --history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API. - --no-history-api-fallback Disallows to proxy requests through a specified index page. - --host Allows to specify a hostname to use. - --hot [value] Enables Hot Module Replacement. - --no-hot Disables Hot Module Replacement. - --ipc [value] Listen to a unix socket. - --live-reload Enables reload/refresh the page(s) when file changes are detected (enabled by default). - --no-live-reload Disables reload/refresh the page(s) when file changes are detected (enabled by default). - --open [value...] Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --no-open Does not open the default browser. - --open-target Opens specified page in browser. - --open-app-name Open specified browser. - --open-reset Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser). - --open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. - --open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. - --port Allows to specify a port to use. - --server-type Allows to set server and options (by default 'http'). - --server-options-passphrase Passphrase for a pfx file. - --server-options-request-cert Request for an SSL certificate. - --no-server-options-request-cert Does not request for an SSL certificate. - --server-options-ca Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. - --server-options-cert Path to an SSL certificate or content of an SSL certificate. - --server-options-cert-reset Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate. - --server-options-crl Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-crl-reset Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). - --server-options-key Path to an SSL key or content of an SSL key. - --server-options-key-reset Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key. - --server-options-pfx Path to an SSL pfx file or content of an SSL pfx file. - --server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. - --static [value...] Allows to configure options for serving static files from directory (by default 'public' directory). - --no-static Disallows to configure options for serving static files from directory. - --static-directory Directory for static contents. - --static-public-path The static files will be available in the browser under this public path. - --static-serve-index Tells dev server to use serveIndex middleware when enabled. - --no-static-serve-index Does not tell dev server to use serveIndex middleware. - --static-watch Watches for files in static content directory. - --no-static-watch Does not watch for files in static content directory. - --static-reset Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory). - --static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path. - --watch-files Allows to configure list of globs/directories/files to watch for file changes. - --watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes. - --no-web-socket-server Disallows to set web socket server and options. - --web-socket-server-type Allows to set web socket server and options (by default 'ws'). - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run the webpack dev server and watch for source file changes while serving. + +Usage: webpack serve|server|s [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on + file change. +--watch-options-stdin Stop watching when stdin stream has + ended. +--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'). +--allowed-hosts-reset Clear all items provided in + 'allowedHosts' configuration. 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'). +--bonjour Allows to broadcasts dev server via + ZeroConf networking on start. +--no-bonjour Disallows to broadcasts dev server via + ZeroConf networking on start. +--no-client Disables client script. +--client-logging Allows to set log level in the + browser. +--client-overlay Enables a full-screen overlay in the + browser when there are compiler errors + or warnings. +--no-client-overlay Disables the full-screen overlay in + the browser when there are compiler + errors or warnings. +--client-overlay-errors Enables a full-screen overlay in the + browser when there are compiler + errors. +--no-client-overlay-errors Disables the full-screen overlay in + the browser when there are compiler + errors. +--client-overlay-warnings Enables a full-screen overlay in the + browser when there are compiler + warnings. +--no-client-overlay-warnings Disables the full-screen overlay in + the browser when there are compiler + warnings. +--client-overlay-runtime-errors Enables a full-screen overlay in the + browser when there are uncaught + runtime errors. +--no-client-overlay-runtime-errors Disables the full-screen overlay in + the browser when there are uncaught + runtime errors. +--client-overlay-trusted-types-policy-name The name of a Trusted Types policy for + the overlay. Defaults to + 'webpack-dev-server#overlay'. +--client-progress [value] Displays compilation progress in the + browser. Options include 'linear' and + 'circular' for visual indicators. +--no-client-progress Does not display compilation progress + in the browser. +--client-reconnect [value] Tells dev-server the number of times + it should try to reconnect the client. +--no-client-reconnect Tells dev-server to not to try to + reconnect the client. +--client-web-socket-transport Allows to set custom web socket + transport to communicate with dev + server. +--client-web-socket-url Allows to specify URL to web socket + server (useful when you're proxying + dev server and client script does not + always know where to connect to). +--client-web-socket-url-hostname Tells clients connected to devServer + to use the provided hostname. +--client-web-socket-url-pathname Tells clients connected to devServer + to use the provided path to connect. +--client-web-socket-url-password Tells clients connected to devServer + to use the provided password to + authenticate. +--client-web-socket-url-port Tells clients connected to devServer + to use the provided port. +--client-web-socket-url-protocol Tells clients connected to devServer + to use the provided protocol. +--client-web-socket-url-username Tells clients connected to devServer + to use the provided username to + authenticate. +--compress Enables gzip compression for + everything served. +--no-compress Disables gzip compression for + everything served. +--history-api-fallback Allows to proxy requests through a + specified index page (by default + 'index.html'), useful for Single Page + Applications that utilise the HTML5 + History API. +--no-history-api-fallback Disallows to proxy requests through a + specified index page. +--host Allows to specify a hostname to use. +--hot [value] Enables Hot Module Replacement. +--no-hot Disables Hot Module Replacement. +--ipc [value] Listen to a unix socket. +--live-reload Enables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--no-live-reload Disables reload/refresh the page(s) + when file changes are detected + (enabled by default). +--open [value...] Allows to configure dev server to open + the browser(s) and page(s) after + server had been started (set it to + true to open your default browser). +--no-open Does not open the default browser. +--open-target Opens specified page in browser. +--open-app-name Open specified browser. +--open-reset Clear all items provided in 'open' + configuration. Allows to configure dev + server to open the browser(s) and + page(s) after server had been started + (set it to true to open your default + browser). +--open-target-reset Clear all items provided in + 'open.target' configuration. Opens + specified page in browser. +--open-app-name-reset Clear all items provided in + 'open.app.name' configuration. Open + specified browser. +--port Allows to specify a port to use. +--server-type Allows to set server and options (by + default 'http'). +--server-options-passphrase Passphrase for a pfx file. +--server-options-request-cert Request for an SSL certificate. +--no-server-options-request-cert Does not request for an SSL + certificate. +--server-options-ca Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-ca-reset Clear all items provided in + 'server.options.ca' configuration. + Path to an SSL CA certificate or + content of an SSL CA certificate. +--server-options-cert Path to an SSL certificate or content + of an SSL certificate. +--server-options-cert-reset Clear all items provided in + 'server.options.cert' configuration. + Path to an SSL certificate or content + of an SSL certificate. +--server-options-crl Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-crl-reset Clear all items provided in + 'server.options.crl' configuration. + Path to PEM formatted CRLs + (Certificate Revocation Lists) or + content of PEM formatted CRLs + (Certificate Revocation Lists). +--server-options-key Path to an SSL key or content of an + SSL key. +--server-options-key-reset Clear all items provided in + 'server.options.key' configuration. + Path to an SSL key or content of an + SSL key. +--server-options-pfx Path to an SSL pfx file or content of + an SSL pfx file. +--server-options-pfx-reset Clear all items provided in + 'server.options.pfx' configuration. + Path to an SSL pfx file or content of + an SSL pfx file. +--static [value...] Allows to configure options for + serving static files from directory + (by default 'public' directory). +--no-static Disallows to configure options for + serving static files from directory. +--static-directory Directory for static contents. +--static-public-path The static files will be available in + the browser under this public path. +--static-serve-index Tells dev server to use serveIndex + middleware when enabled. +--no-static-serve-index Does not tell dev server to use + serveIndex middleware. +--static-watch Watches for files in static content + directory. +--no-static-watch Does not watch for files in static + content directory. +--static-reset Clear all items provided in 'static' + configuration. Allows to configure + options for serving static files from + directory (by default 'public' + directory). +--static-public-path-reset Clear all items provided in + 'static.publicPath' configuration. The + static files will be available in the + browser under this public path. +--watch-files Allows to configure list of + globs/directories/files to watch for + file changes. +--watch-files-reset Clear all items provided in + 'watchFiles' configuration. Allows to + configure list of + globs/directories/files to watch for + file changes. +--no-web-socket-server Disallows to set web socket server and + options. +--web-socket-server-type Allows to set web socket server and + options (by default 'ws'). + +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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 't' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 't' command using command syntax: stdout 1`] = ` -"Usage: webpack configtest|t [config-path] +"Validate a webpack configuration. -Validate a webpack configuration. +Usage: webpack configtest|t [config-path] -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 't' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 't' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack configtest|t [config-path] +"Validate a webpack configuration. -Validate a webpack configuration. +Usage: webpack configtest|t [config-path] -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 't' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 't' command using the "--help" option: stdout 1`] = ` -"Usage: webpack configtest|t [config-path] +"Validate a webpack configuration. -Validate a webpack configuration. +Usage: webpack configtest|t [config-path] -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'w' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'w' command using command syntax: stdout 1`] = ` -"Usage: webpack watch|w [entries...] [options] - -Run webpack and watch for files changes. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack and watch for files changes. + +Usage: webpack watch|w [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'w' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 'w' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack watch|w [entries...] [options] - -Run webpack and watch for files changes. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - --no-amd Negative 'amd' option. - --bail Report the first error as a hard error instead of tolerating it. - --no-bail Negative 'bail' option. - --cache Enable in memory caching. Disable caching. - --no-cache Negative 'cache' option. - --cache-cache-unaffected Additionally cache computation of modules that are unchanged and reference only unchanged modules. - --no-cache-cache-unaffected Negative 'cache-cache-unaffected' option. - --cache-max-generations Number of generations unused cache entries stay in memory cache +"Run webpack and watch for files changes. + +Usage: webpack watch|w [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +--no-amd Negative 'amd' option. +--bail Report the first error as a hard error + instead of tolerating it. +--no-bail Negative 'bail' option. +--cache Enable in memory caching. Disable + caching. +--no-cache Negative 'cache' option. +--cache-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules. +--no-cache-cache-unaffected Negative 'cache-cache-unaffected' + option. +--cache-max-generations Number of generations unused cache + entries stay in memory cache at + minimum (1 = may be removed after + unused for a single compilation, ..., + Infinity: kept forever). +--cache-type In memory caching. Filesystem caching. +--cache-allow-collecting-memory Allows to collect unused memory + allocated during deserialization. This + requires copying data into smaller + buffers and has a performance cost. +--no-cache-allow-collecting-memory Negative + 'cache-allow-collecting-memory' + option. +--cache-cache-directory Base directory for the cache (defaults + to node_modules/.cache/webpack). +--cache-cache-location Locations for the cache (defaults to + cacheDirectory / name). +--cache-compression Compression type used for the cache + files. +--no-cache-compression Negative 'cache-compression' option. +--cache-hash-algorithm Algorithm used for generation the hash + (see node.js crypto package). +--cache-idle-timeout Time in ms after which idle period the + cache storing should happen. +--cache-idle-timeout-after-large-changes Time in ms after which idle period the + cache storing should happen when + larger changes has been detected + (cumulative build time > 2 x avg cache + store time). +--cache-idle-timeout-for-initial-store Time in ms after which idle period the + initial cache storing should happen. +--cache-immutable-paths A RegExp matching an immutable + directory (usually a package manager + cache directory, including the tailing + slash) A path to an immutable + directory (usually a package manager + cache directory). +--cache-immutable-paths-reset Clear all items provided in + 'cache.immutablePaths' configuration. + List of paths that are managed by a + package manager and contain a version + or hash in its path so all files are + immutable. +--cache-managed-paths A RegExp matching a managed directory + (usually a node_modules directory, + including the tailing slash) A path to + a managed directory (usually a + node_modules directory). +--cache-managed-paths-reset Clear all items provided in + 'cache.managedPaths' configuration. + List of paths that are managed by a + package manager and can be trusted to + not be modified otherwise. +--cache-max-age Time for which unused cache entries + stay in the filesystem cache at + minimum (in milliseconds). +--cache-max-memory-generations Number of generations unused cache + entries stay in memory cache at + minimum (0 = no memory cache used, 1 = + may be removed after unused for a + single compilation, ..., Infinity: + kept forever). Cache entries will be + deserialized from disk when removed + from memory cache. +--cache-memory-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules in + memory. +--no-cache-memory-cache-unaffected Negative + 'cache-memory-cache-unaffected' + option. +--cache-name Name for the cache. Different names + will lead to different coexisting + caches. +--cache-profile Track and log detailed timing + information for individual cache + items. +--no-cache-profile Negative 'cache-profile' option. +--cache-readonly Enable/disable readonly mode. +--no-cache-readonly Negative 'cache-readonly' option. +--cache-store When to store data to the filesystem. + (pack: Store data when compiler is + idle in a single file). +--cache-version Version of the cache data. Different + versions won't allow to reuse the + cache and override existing content. + Update the version when config changed + in a way which doesn't allow to reuse + cache. This will invalidate the cache. +--context The base directory (absolute path!) + for resolving the \`entry\` option. If + \`output.pathinfo\` is set, the included + pathinfo is shortened to this + directory. +--dependencies References to another configuration to + depend on. +--dependencies-reset Clear all items provided in + 'dependencies' configuration. + References to other configurations to + depend on. +--no-dev-server Negative 'dev-server' option. +--devtool-type Which asset type should receive this + devtool value. +--devtool-use A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool-use Negative 'devtool-use' option. +--devtool-reset Clear all items provided in 'devtool' + configuration. A developer tool to + enhance debugging (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--dotenv Enable Dotenv plugin with default + options. +--no-dotenv Negative 'dotenv' option. +--dotenv-dir The directory from which .env files + are loaded. Can be an absolute path, + false will disable the .env file + loading. +--no-dotenv-dir Negative 'dotenv-dir' option. +--dotenv-prefix A prefix that environment variables + must start with to be exposed. +--dotenv-prefix-reset Clear all items provided in + 'dotenv.prefix' configuration. Only + expose environment variables that + start with these prefixes. Defaults to + 'WEBPACK_'. +--dotenv-template A template pattern for .env file + names. +--dotenv-template-reset Clear all items provided in + 'dotenv.template' configuration. + Template patterns for .env file names. + Use [mode] as placeholder for the + webpack mode. Defaults to ['.env', + '.env.local', '.env.[mode]', + '.env.[mode].local']. +--entry A module that is loaded upon startup. + Only the last one is exported. +--entry-reset Clear all items provided in 'entry' + configuration. All modules are loaded + upon startup. The last one is + exported. +--experiments-async-web-assembly Support WebAssembly as asynchronous + EcmaScript Module. +--no-experiments-async-web-assembly Negative + 'experiments-async-web-assembly' + option. +--experiments-back-compat Enable backward-compat layer with + deprecation warnings for many webpack + 4 APIs. +--no-experiments-back-compat Negative 'experiments-back-compat' + option. +--experiments-build-http-allowed-uris Allowed URI pattern. Allowed URI + (resp. the beginning of it). +--experiments-build-http-allowed-uris-reset Clear all items provided in + 'experiments.buildHttp.allowedUris' + configuration. List of allowed URIs + (resp. the beginning of them). +--experiments-build-http-cache-location Location where resource content is + stored for lockfile entries. It's also + possible to disable storing by passing + false. +--no-experiments-build-http-cache-location Negative + 'experiments-build-http-cache-location + ' option. +--experiments-build-http-frozen When set, anything that would lead to + a modification of the lockfile or any + resource content, will result in an + error. +--no-experiments-build-http-frozen Negative + 'experiments-build-http-frozen' + option. +--experiments-build-http-lockfile-location Location of the lockfile. +--experiments-build-http-proxy Proxy configuration, which can be used + to specify a proxy server to use for + HTTP requests. +--experiments-build-http-upgrade When set, resources of existing + lockfile entries will be fetched and + entries will be upgraded when resource + content has changed. +--no-experiments-build-http-upgrade Negative + 'experiments-build-http-upgrade' + option. +--experiments-cache-unaffected Enable additional in memory caching of + modules that are unchanged and + reference only unchanged modules. +--no-experiments-cache-unaffected Negative + 'experiments-cache-unaffected' option. +--experiments-css Enable css support. +--no-experiments-css Negative 'experiments-css' option. +--experiments-defer-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-defer + -import-eval. This allows to defer + execution of a module until it's first + use. +--no-experiments-defer-import Negative 'experiments-defer-import' + option. +--experiments-future-defaults Apply defaults of next major version. +--no-experiments-future-defaults Negative 'experiments-future-defaults' + option. +--experiments-lazy-compilation Compile entrypoints and import()s only + when they are accessed. +--no-experiments-lazy-compilation Negative + 'experiments-lazy-compilation' option. +--experiments-lazy-compilation-backend-client A custom client. +--experiments-lazy-compilation-backend-listen A port. +--experiments-lazy-compilation-backend-listen-host A host. +--experiments-lazy-compilation-backend-listen-port A port. +--experiments-lazy-compilation-backend-protocol Specifies the protocol the client + should use to connect to the server. +--experiments-lazy-compilation-entries Enable/disable lazy compilation for + entries. +--no-experiments-lazy-compilation-entries Negative + 'experiments-lazy-compilation-entries' + option. +--experiments-lazy-compilation-imports Enable/disable lazy compilation for + import() modules. +--no-experiments-lazy-compilation-imports Negative + 'experiments-lazy-compilation-imports' + option. +--experiments-lazy-compilation-test Specify which entrypoints or + import()ed modules should be lazily + compiled. This is matched with the + imported module and not the entrypoint + name. +--experiments-output-module Allow output javascript files as + module source type. +--no-experiments-output-module Negative 'experiments-output-module' + option. +--experiments-source-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-sourc + e-phase-imports. This allows importing + modules at stack. - --watch-options-poll [value] \`number\`: use polling with specified interval. \`true\`: use polling. - --no-watch-options-poll Negative 'watch-options-poll' 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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +--watch-options-poll [value] \`number\`: use polling with specified + interval. \`true\`: use polling. +--no-watch-options-poll Negative 'watch-options-poll' 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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'w' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'w' command using the "--help" option: stdout 1`] = ` -"Usage: webpack watch|w [entries...] [options] - -Run webpack and watch for files changes. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack and watch for files changes. + +Usage: webpack watch|w [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'watch' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'watch' and respect the "--color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack watch|w [entries...] [options] - -Run webpack and watch for files changes. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack and watch for files changes. + +Usage: webpack watch|w [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'watch' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'watch' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack watch|w [entries...] [options] - -Run webpack and watch for files changes. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack and watch for files changes. + +Usage: webpack watch|w [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'watch' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'watch' command using command syntax: stdout 1`] = ` -"Usage: webpack watch|w [entries...] [options] - -Run webpack and watch for files changes. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack and watch for files changes. + +Usage: webpack watch|w [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'watch' command using the "--help verbose" option: stderr 1`] = `""`; exports[`help should show help information for 'watch' command using the "--help verbose" option: stdout 1`] = ` -"Usage: webpack watch|w [entries...] [options] - -Run webpack and watch for files changes. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - --no-amd Negative 'amd' option. - --bail Report the first error as a hard error instead of tolerating it. - --no-bail Negative 'bail' option. - --cache Enable in memory caching. Disable caching. - --no-cache Negative 'cache' option. - --cache-cache-unaffected Additionally cache computation of modules that are unchanged and reference only unchanged modules. - --no-cache-cache-unaffected Negative 'cache-cache-unaffected' option. - --cache-max-generations Number of generations unused cache entries stay in memory cache +"Run webpack and watch for files changes. + +Usage: webpack watch|w [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the + config file. +--no-amd Negative 'amd' option. +--bail Report the first error as a hard error + instead of tolerating it. +--no-bail Negative 'bail' option. +--cache Enable in memory caching. Disable + caching. +--no-cache Negative 'cache' option. +--cache-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules. +--no-cache-cache-unaffected Negative 'cache-cache-unaffected' + option. +--cache-max-generations Number of generations unused cache + entries stay in memory cache at + minimum (1 = may be removed after + unused for a single compilation, ..., + Infinity: kept forever). +--cache-type In memory caching. Filesystem caching. +--cache-allow-collecting-memory Allows to collect unused memory + allocated during deserialization. This + requires copying data into smaller + buffers and has a performance cost. +--no-cache-allow-collecting-memory Negative + 'cache-allow-collecting-memory' + option. +--cache-cache-directory Base directory for the cache (defaults + to node_modules/.cache/webpack). +--cache-cache-location Locations for the cache (defaults to + cacheDirectory / name). +--cache-compression Compression type used for the cache + files. +--no-cache-compression Negative 'cache-compression' option. +--cache-hash-algorithm Algorithm used for generation the hash + (see node.js crypto package). +--cache-idle-timeout Time in ms after which idle period the + cache storing should happen. +--cache-idle-timeout-after-large-changes Time in ms after which idle period the + cache storing should happen when + larger changes has been detected + (cumulative build time > 2 x avg cache + store time). +--cache-idle-timeout-for-initial-store Time in ms after which idle period the + initial cache storing should happen. +--cache-immutable-paths A RegExp matching an immutable + directory (usually a package manager + cache directory, including the tailing + slash) A path to an immutable + directory (usually a package manager + cache directory). +--cache-immutable-paths-reset Clear all items provided in + 'cache.immutablePaths' configuration. + List of paths that are managed by a + package manager and contain a version + or hash in its path so all files are + immutable. +--cache-managed-paths A RegExp matching a managed directory + (usually a node_modules directory, + including the tailing slash) A path to + a managed directory (usually a + node_modules directory). +--cache-managed-paths-reset Clear all items provided in + 'cache.managedPaths' configuration. + List of paths that are managed by a + package manager and can be trusted to + not be modified otherwise. +--cache-max-age Time for which unused cache entries + stay in the filesystem cache at + minimum (in milliseconds). +--cache-max-memory-generations Number of generations unused cache + entries stay in memory cache at + minimum (0 = no memory cache used, 1 = + may be removed after unused for a + single compilation, ..., Infinity: + kept forever). Cache entries will be + deserialized from disk when removed + from memory cache. +--cache-memory-cache-unaffected Additionally cache computation of + modules that are unchanged and + reference only unchanged modules in + memory. +--no-cache-memory-cache-unaffected Negative + 'cache-memory-cache-unaffected' + option. +--cache-name Name for the cache. Different names + will lead to different coexisting + caches. +--cache-profile Track and log detailed timing + information for individual cache + items. +--no-cache-profile Negative 'cache-profile' option. +--cache-readonly Enable/disable readonly mode. +--no-cache-readonly Negative 'cache-readonly' option. +--cache-store When to store data to the filesystem. + (pack: Store data when compiler is + idle in a single file). +--cache-version Version of the cache data. Different + versions won't allow to reuse the + cache and override existing content. + Update the version when config changed + in a way which doesn't allow to reuse + cache. This will invalidate the cache. +--context The base directory (absolute path!) + for resolving the \`entry\` option. If + \`output.pathinfo\` is set, the included + pathinfo is shortened to this + directory. +--dependencies References to another configuration to + depend on. +--dependencies-reset Clear all items provided in + 'dependencies' configuration. + References to other configurations to + depend on. +--no-dev-server Negative 'dev-server' option. +--devtool-type Which asset type should receive this + devtool value. +--devtool-use A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool-use Negative 'devtool-use' option. +--devtool-reset Clear all items provided in 'devtool' + configuration. A developer tool to + enhance debugging (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][ch + eap-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--dotenv Enable Dotenv plugin with default + options. +--no-dotenv Negative 'dotenv' option. +--dotenv-dir The directory from which .env files + are loaded. Can be an absolute path, + false will disable the .env file + loading. +--no-dotenv-dir Negative 'dotenv-dir' option. +--dotenv-prefix A prefix that environment variables + must start with to be exposed. +--dotenv-prefix-reset Clear all items provided in + 'dotenv.prefix' configuration. Only + expose environment variables that + start with these prefixes. Defaults to + 'WEBPACK_'. +--dotenv-template A template pattern for .env file + names. +--dotenv-template-reset Clear all items provided in + 'dotenv.template' configuration. + Template patterns for .env file names. + Use [mode] as placeholder for the + webpack mode. Defaults to ['.env', + '.env.local', '.env.[mode]', + '.env.[mode].local']. +--entry A module that is loaded upon startup. + Only the last one is exported. +--entry-reset Clear all items provided in 'entry' + configuration. All modules are loaded + upon startup. The last one is + exported. +--experiments-async-web-assembly Support WebAssembly as asynchronous + EcmaScript Module. +--no-experiments-async-web-assembly Negative + 'experiments-async-web-assembly' + option. +--experiments-back-compat Enable backward-compat layer with + deprecation warnings for many webpack + 4 APIs. +--no-experiments-back-compat Negative 'experiments-back-compat' + option. +--experiments-build-http-allowed-uris Allowed URI pattern. Allowed URI + (resp. the beginning of it). +--experiments-build-http-allowed-uris-reset Clear all items provided in + 'experiments.buildHttp.allowedUris' + configuration. List of allowed URIs + (resp. the beginning of them). +--experiments-build-http-cache-location Location where resource content is + stored for lockfile entries. It's also + possible to disable storing by passing + false. +--no-experiments-build-http-cache-location Negative + 'experiments-build-http-cache-location + ' option. +--experiments-build-http-frozen When set, anything that would lead to + a modification of the lockfile or any + resource content, will result in an + error. +--no-experiments-build-http-frozen Negative + 'experiments-build-http-frozen' + option. +--experiments-build-http-lockfile-location Location of the lockfile. +--experiments-build-http-proxy Proxy configuration, which can be used + to specify a proxy server to use for + HTTP requests. +--experiments-build-http-upgrade When set, resources of existing + lockfile entries will be fetched and + entries will be upgraded when resource + content has changed. +--no-experiments-build-http-upgrade Negative + 'experiments-build-http-upgrade' + option. +--experiments-cache-unaffected Enable additional in memory caching of + modules that are unchanged and + reference only unchanged modules. +--no-experiments-cache-unaffected Negative + 'experiments-cache-unaffected' option. +--experiments-css Enable css support. +--no-experiments-css Negative 'experiments-css' option. +--experiments-defer-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-defer + -import-eval. This allows to defer + execution of a module until it's first + use. +--no-experiments-defer-import Negative 'experiments-defer-import' + option. +--experiments-future-defaults Apply defaults of next major version. +--no-experiments-future-defaults Negative 'experiments-future-defaults' + option. +--experiments-lazy-compilation Compile entrypoints and import()s only + when they are accessed. +--no-experiments-lazy-compilation Negative + 'experiments-lazy-compilation' option. +--experiments-lazy-compilation-backend-client A custom client. +--experiments-lazy-compilation-backend-listen A port. +--experiments-lazy-compilation-backend-listen-host A host. +--experiments-lazy-compilation-backend-listen-port A port. +--experiments-lazy-compilation-backend-protocol Specifies the protocol the client + should use to connect to the server. +--experiments-lazy-compilation-entries Enable/disable lazy compilation for + entries. +--no-experiments-lazy-compilation-entries Negative + 'experiments-lazy-compilation-entries' + option. +--experiments-lazy-compilation-imports Enable/disable lazy compilation for + import() modules. +--no-experiments-lazy-compilation-imports Negative + 'experiments-lazy-compilation-imports' + option. +--experiments-lazy-compilation-test Specify which entrypoints or + import()ed modules should be lazily + compiled. This is matched with the + imported module and not the entrypoint + name. +--experiments-output-module Allow output javascript files as + module source type. +--no-experiments-output-module Negative 'experiments-output-module' + option. +--experiments-source-import Enable experimental tc39 proposal + https://github.com/tc39/proposal-sourc + e-phase-imports. This allows importing + modules at stack. - --watch-options-poll [value] \`number\`: use polling with specified interval. \`true\`: use polling. - --no-watch-options-poll Negative 'watch-options-poll' 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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +--watch-options-poll [value] \`number\`: use polling with specified + interval. \`true\`: use polling. +--no-watch-options-poll Negative 'watch-options-poll' 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 other + packages. +-h, --help [verbose] Display help for commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information for 'watch' command using the "--help" option: stderr 1`] = `""`; exports[`help should show help information for 'watch' command using the "--help" option: stdout 1`] = ` -"Usage: webpack watch|w [entries...] [options] - -Run webpack and watch for files changes. - -Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - --watch-options-stdin Stop watching when stdin stream has ended. - -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 other packages. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"Run webpack and watch for files changes. + +Usage: webpack watch|w [entries...] [options] + +Options +-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'. +--env Environment variables passed to the + configuration when it is a function, + e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the + specified value for access within the + configuration. +--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. +--disable-interpret Disable interpret for loading the config + file. +-d, --devtool A developer tool to enhance debugging + (false | eval | + [inline-|hidden-|eval-][nosources-][chea + p-[module-]]source-map). +--no-devtool Negative 'devtool' option. +--entry A module that is loaded upon startup. + Only the last one is exported. +-e, --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. +-t, --target Specific environment, runtime, or + syntax. Environment to build for. An + array of environments to build for all + of them when possible. +-w, --watch Enter watch mode, which rebuilds on file + change. +--watch-options-stdin Stop watching when stdin stream has + ended. + +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 other packages. +-h, --help [verbose] Display help for commands and options. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using command syntax: stderr 1`] = `""`; @@ -2351,48 +5731,48 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. +-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'. +--env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. +--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. +--disable-interpret Disable interpret for loading the config file. +-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. +-e, --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. +-t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. +-w, --watch Enter watch mode, which rebuilds on file change. +--watch-options-stdin Stop watching when stdin stream has ended. 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 other packages. - -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 other packages. +-h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - 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 other packages. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). +configtest|t [config-path] Validate a webpack configuration. +help|h [command] [option] Display help for commands and options. +info|i [options] Outputs information about your system. +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 other packages. +watch|w [entries...] [options] Run webpack and watch for files changes. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "--help" option with the "verbose" value #2: stderr 1`] = `""`; @@ -2403,9 +5783,9 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. ... -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +ocumentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "--help" option with the "verbose" value: stderr 1`] = `""`; @@ -2416,9 +5796,9 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. ... -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +ocumentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "--help" option: stderr 1`] = `""`; @@ -2430,278 +5810,318 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. +-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'. +--env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. +--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. +--disable-interpret Disable interpret for loading the config file. +-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. +-e, --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. +-t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. +-w, --watch Enter watch mode, which rebuilds on file change. +--watch-options-stdin Stop watching when stdin stream has ended. 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 other packages. - -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 other packages. +-h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - 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 other packages. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). +configtest|t [config-path] Validate a webpack configuration. +help|h [command] [option] Display help for commands and options. +info|i [options] Outputs information about your system. +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 other packages. +watch|w [entries...] [options] Run webpack and watch for files changes. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --cache-type" option when using serve: stderr 1`] = `""`; exports[`help should show help information using the "help --cache-type" option when using serve: stdout 1`] = ` -"Usage: webpack serve --cache-type -Description: In memory caching. Filesystem caching. -Possible values: 'memory' | 'filesystem' +"--cache-type: +Usage webpack serve --cache-type +Description In memory caching. Filesystem caching. +Documentation https://webpack.js.org/option/cache-type/ +Possible values 'memory' | 'filesystem' -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --cache-type" option: stderr 1`] = `""`; exports[`help should show help information using the "help --cache-type" option: stdout 1`] = ` -"Usage: webpack --cache-type -Description: In memory caching. Filesystem caching. -Possible values: 'memory' | 'filesystem' +"--cache-type: +Usage webpack --cache-type +Description In memory caching. Filesystem caching. +Documentation https://webpack.js.org/option/cache-type/ +Possible values 'memory' | 'filesystem' -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --color" option: stderr 1`] = `""`; exports[`help should show help information using the "help --color" option: stdout 1`] = ` -"Usage: webpack --color -Description: Enable colors on console. +"--color: +Usage webpack --color +Description Enable colors on console. +Documentation https://webpack.js.org/option/color/ -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --mode" option: stderr 1`] = `""`; exports[`help should show help information using the "help --mode" option: stdout 1`] = ` -"Usage: webpack --mode -Description: Enable production optimizations or development hints. -Possible values: 'development' | 'production' | 'none' +"--mode: +Usage webpack --mode +Description Enable production optimizations or development hints. +Documentation https://webpack.js.org/option/mode/ +Possible values 'development' | 'production' | 'none' -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --no-color" option: stderr 1`] = `""`; exports[`help should show help information using the "help --no-color" option: stdout 1`] = ` -"Usage: webpack --no-color -Description: Disable colors on console. +"--no-color: +Usage webpack --no-color +Description Disable colors on console. +Documentation https://webpack.js.org/option/no-color/ -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --no-stats" option: stderr 1`] = `""`; exports[`help should show help information using the "help --no-stats" option: stdout 1`] = ` -"Usage: webpack --no-stats -Description: Negative 'stats' option. +"--no-stats: +Usage webpack --no-stats +Description Negative 'stats' option. +Documentation https://webpack.js.org/option/no-stats/ -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --output-chunk-format" option: stderr 1`] = `""`; exports[`help should show help information using the "help --output-chunk-format" option: stdout 1`] = ` -"Usage: webpack --output-chunk-format -Description: The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins). -Possible values: 'array-push' | 'commonjs' | 'module' | false - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"--output-chunk-format: +Usage webpack --output-chunk-format +Description The format of chunks (formats included by default are + 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' + (ESM), but others might be added by plugins). +Documentation https://webpack.js.org/option/output-chunk-format/ +Possible values 'array-push' | 'commonjs' | 'module' | false + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --server-type" option when using serve: stderr 1`] = `""`; exports[`help should show help information using the "help --server-type" option when using serve: stdout 1`] = ` -"Usage: webpack serve --server-type -Description: Allows to set server and options (by default 'http'). -Possible values: 'http' | 'https' | 'spdy' | 'http2' +"--server-type: +Usage webpack serve --server-type +Description Allows to set server and options (by default 'http'). +Documentation https://webpack.js.org/option/server-type/ +Possible values 'http' | 'https' | 'spdy' | 'http2' -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --stats" option: stderr 1`] = `""`; exports[`help should show help information using the "help --stats" option: stdout 1`] = ` -"Usage: webpack --stats [value] -Description: Stats options object or preset name. -Possible values: 'none' | 'summary' | 'errors-only' | 'errors-warnings' | 'minimal' | 'normal' | 'detailed' | 'verbose' - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"--stats: +Usage webpack --stats [value] +Description Stats options object or preset name. +Documentation https://webpack.js.org/option/stats/ +Possible values 'none' | 'summary' | 'errors-only' | 'errors-warnings' | + 'minimal' | 'normal' | 'detailed' | 'verbose' + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --target" option: stderr 1`] = `""`; exports[`help should show help information using the "help --target" option: stdout 1`] = ` -"Usage: webpack --target -Short: webpack -t -Description: Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. -Possible values: false - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"--target: +Usage webpack --target +Short webpack -t +Description Specific environment, runtime, or syntax. Environment to + build for. An array of environments to build for all of them + when possible. +Documentation https://webpack.js.org/option/target/ +Possible values false + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help --version" option: stderr 1`] = `""`; exports[`help should show help information using the "help --version" option: stdout 1`] = ` -"Usage: webpack --version -Short: webpack -v -Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and other packages. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"--version: +Usage webpack --version +Short webpack -v +Description Output the version number of 'webpack', 'webpack-cli' and + 'webpack-dev-server' and other packages. +Documentation https://webpack.js.org/option/version/ + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help -v" option: stderr 1`] = `""`; exports[`help should show help information using the "help -v" option: stdout 1`] = ` -"Usage: webpack --version -Short: webpack -v -Description: Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and other packages. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +"--version: +Usage webpack --version +Short webpack -v +Description Output the version number of 'webpack', 'webpack-cli' and + 'webpack-dev-server' and other packages. +Documentation https://webpack.js.org/option/version/ + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help serve --color" option: stderr 1`] = `""`; exports[`help should show help information using the "help serve --color" option: stdout 1`] = ` -"Usage: webpack serve --color -Description: Enable colors on console. +"--color: +Usage webpack serve --color +Description Enable colors on console. +Documentation https://webpack.js.org/option/color/ -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help serve --mode" option: stderr 1`] = `""`; exports[`help should show help information using the "help serve --mode" option: stdout 1`] = ` -"Usage: webpack serve --mode -Description: Enable production optimizations or development hints. -Possible values: 'development' | 'production' | 'none' +"--mode: +Usage webpack serve --mode +Description Enable production optimizations or development hints. +Documentation https://webpack.js.org/option/mode/ +Possible values 'development' | 'production' | 'none' -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information using the "help serve --no-color" option: stderr 1`] = `""`; exports[`help should show help information using the "help serve --no-color" option: stdout 1`] = ` -"Usage: webpack serve --no-color -Description: Disable colors on console. +"--no-color: +Usage webpack serve --no-color +Description Disable colors on console. +Documentation https://webpack.js.org/option/no-color/ -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show help information with options for sub commands: stderr 1`] = `""`; exports[`help should show help information with options for sub commands: stdout 1`] = ` -"Usage: webpack info|i [options] +"Outputs information about your system. -Outputs information about your system. +Usage: webpack info|i [options] -Options: - -o, --output To get the output in a specified format (accept json or markdown) - -a, --additional-package Adds additional packages to the output +Options +-o, --output To get the output in a specified format + (accept json or markdown) +-a, --additional-package Adds additional packages to the output -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 other packages. - -h, --help [verbose] Display help for commands and options. +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 other packages. +-h, --help [verbose] Display help for commands and options. -To see list of all supported commands and options run 'webpack --help=verbose'. +Run 'webpack --help=verbose' to see all available commands and options. -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show the same information using the "--help" option and command syntax: stderr from command syntax 1`] = `""`; @@ -2715,48 +6135,48 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. +-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'. +--env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. +--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. +--disable-interpret Disable interpret for loading the config file. +-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. +-e, --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. +-t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. +-w, --watch Enter watch mode, which rebuilds on file change. +--watch-options-stdin Stop watching when stdin stream has ended. 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 other packages. - -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 other packages. +-h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - 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 other packages. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). +configtest|t [config-path] Validate a webpack configuration. +help|h [command] [option] Display help for commands and options. +info|i [options] Outputs information about your system. +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 other packages. +watch|w [entries...] [options] Run webpack and watch for files changes. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; exports[`help should show the same information using the "--help" option and command syntax: stdout from option 1`] = ` @@ -2766,46 +6186,46 @@ Alternative usage to run commands: webpack [command] [options] The build tool for modern web applications. Options: - -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'. - --env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". - --config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. - --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. - --disable-interpret Disable interpret for loading the config file. - -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. - -e, --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. - -t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. - -w, --watch Enter watch mode, which rebuilds on file change. - --watch-options-stdin Stop watching when stdin stream has ended. +-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'. +--env Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval". +--config-node-env Sets process.env.NODE_ENV to the specified value for access within the configuration. +--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. +--disable-interpret Disable interpret for loading the config file. +-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. +-e, --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. +-t, --target Specific environment, runtime, or syntax. Environment to build for. An array of environments to build for all of them when possible. +-w, --watch Enter watch mode, which rebuilds on file change. +--watch-options-stdin Stop watching when stdin stream has ended. 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 other packages. - -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 other packages. +-h, --help [verbose] Display help for commands and options. Commands: - build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). - configtest|t [config-path] Validate a webpack configuration. - help|h [command] [option] Display help for commands and options. - info|i [options] Outputs information about your system. - 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 other packages. - watch|w [entries...] [options] Run webpack and watch for files changes. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." +build|bundle|b [entries...] [options] Run webpack (default command, can be omitted). +configtest|t [config-path] Validate a webpack configuration. +help|h [command] [option] Display help for commands and options. +info|i [options] Outputs information about your system. +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 other packages. +watch|w [entries...] [options] Run webpack and watch for files changes. + +Run 'webpack --help=verbose' to see all available commands and options. + +Webpack documentation: https://webpack.js.org/ +CLI documentation: https://webpack.js.org/api/cli/ +Made with ♥ by the webpack team" `; diff --git a/test/info/additional-package.test.js b/test/info/additional-package.test.js index 8a4418a98a6..c58bbe2ec5a 100644 --- a/test/info/additional-package.test.js +++ b/test/info/additional-package.test.js @@ -1,7 +1,7 @@ "use strict"; const { join } = require("node:path"); -const { run } = require("../utils/test-utils"); +const { run, stripRendererChrome } = require("../utils/test-utils"); describe("'-a, --additional-package ' usage", () => { it("should work with only one package", async () => { @@ -13,7 +13,7 @@ describe("'-a, --additional-package ' usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("System:"); + expect(stripRendererChrome(stdout)).toContain("System:"); expect(stdout).toContain("Node"); expect(stdout).toContain("npm"); expect(stdout).toContain("Yarn"); @@ -30,7 +30,7 @@ describe("'-a, --additional-package ' usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("System:"); + expect(stripRendererChrome(stdout)).toContain("System:"); expect(stdout).toContain("Node"); expect(stdout).toContain("npm"); expect(stdout).toContain("Yarn"); @@ -49,7 +49,7 @@ describe("'-a, --additional-package ' usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("System:"); + expect(stripRendererChrome(stdout)).toContain("System:"); expect(stdout).toContain("Node"); expect(stdout).toContain("npm"); expect(stdout).toContain("Yarn"); @@ -70,7 +70,7 @@ describe("'-a, --additional-package ' usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("System:"); + expect(stripRendererChrome(stdout)).toContain("System:"); expect(stdout).toContain("Node"); expect(stdout).toContain("npm"); expect(stdout).toContain("Yarn"); diff --git a/test/info/basic.test.js b/test/info/basic.test.js index 850ed78e78c..af37172a934 100644 --- a/test/info/basic.test.js +++ b/test/info/basic.test.js @@ -1,5 +1,5 @@ const { join } = require("node:path"); -const { run } = require("../utils/test-utils"); +const { run, stripRendererChrome } = require("../utils/test-utils"); describe("basic usage", () => { it("should work", async () => { @@ -7,7 +7,7 @@ describe("basic usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("System:"); + expect(stripRendererChrome(stdout)).toContain("System:"); expect(stdout).toContain("Node"); expect(stdout).toContain("npm"); expect(stdout).toContain("Yarn"); @@ -19,9 +19,9 @@ describe("basic usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("System:"); - expect(stdout).toContain("Monorepos:"); - expect(stdout).toContain("Packages:"); + expect(stripRendererChrome(stdout)).toContain("System:"); + expect(stripRendererChrome(stdout)).toContain("Monorepos:"); + expect(stripRendererChrome(stdout)).toContain("Packages:"); expect(stdout).toContain("Node"); expect(stdout).toContain("npm"); expect(stdout).toContain("Yarn"); diff --git a/test/info/output.test.js b/test/info/output.test.js index 7ec0e814d7a..45e7ac620b4 100644 --- a/test/info/output.test.js +++ b/test/info/output.test.js @@ -1,6 +1,6 @@ "use strict"; -const { run } = require("../utils/test-utils"); +const { run, stripRendererChrome } = require("../utils/test-utils"); describe("'-o, --output ' usage", () => { it("gets info text by default", async () => { @@ -8,7 +8,7 @@ describe("'-o, --output ' usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("System:"); + expect(stripRendererChrome(stdout)).toContain("System:"); expect(stdout).toContain("Node"); expect(stdout).toContain("npm"); expect(stdout).toContain("Yarn"); @@ -20,7 +20,7 @@ describe("'-o, --output ' usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain('"System":'); + expect(stripRendererChrome(stdout)).toContain('"System":'); const parse = () => { const output = JSON.parse(stdout); diff --git a/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer5.webpack5 b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer5.webpack5 index b53f2dba26b..749b6c31f59 100644 --- a/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer5.webpack5 +++ b/test/serve/invalid-schema/__snapshots__/invalid-schema.test.js.snap.devServer5.webpack5 @@ -3,8 +3,8 @@ exports[`invalid schema should log webpack error and exit process on invalid config: stderr 1`] = ` "[webpack-cli] Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - configuration.mode should be one of these: - "development" | "production" | "none" - -> Enable production optimizations or development hints." + "development" | "production" | "none" + -> Enable production optimizations or development hints." `; exports[`invalid schema should log webpack error and exit process on invalid config: stdout 1`] = `""`; @@ -19,12 +19,12 @@ exports[`invalid schema should log webpack error and exit process on invalid fla exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stderr 1`] = ` "[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.bonjour should be one of these: - boolean | object { … } - -> Allows to broadcasts dev server via ZeroConf networking on start. - -> Read more + boolean | object { … } + -> Allows to broadcasts dev server via ZeroConf networking on start. + -> Read more at stack - -> Options for bonjour. - -> Read more at https://github.com/watson/bonjour#initializing" + -> Options for bonjour. + -> Read more at https://github.com/watson/bonjour#initializing" `; exports[`invalid schema should log webpack-dev-server error and exit process on invalid config: stdout 1`] = `""`; diff --git a/test/utils/test-utils.js b/test/utils/test-utils.js index 16d8883eb87..f9b197d8b0e 100644 --- a/test/utils/test-utils.js +++ b/test/utils/test-utils.js @@ -234,6 +234,53 @@ const runPromptWithAnswers = async (cwd, args, answers = [], options = {}) => { }); }; +/** + * Strips webpack-cli UI renderer chrome from stdout/stderr so that + * tests written before the renderer was introduced continue to work + * without modification. + * + * Removes: + * - Command header block (⬡ webpack \n───\n\n) + * - Command footer block (───\n) + * - Status prefix icons (✔ / ✖ / ⚠ / ℹ at line start) + * - Divider lines (lines that are only ─ chars + whitespace) + * - The 2-space indent that the renderer adds to every stats line + * + * The result is what the CLI would have printed before the renderer + * existed, so legacy assertions keep working unchanged. + * @param {string} str The raw output string from the CLI. + * @returns {string} The sanitized string with UI chrome removed. + */ +function stripRendererChrome(str) { + if (!str) return str; + + return ( + str + .split("\n") + // Drop divider lines + .filter((line) => !/^\s*─{10,}\s*$/.test(line)) + // Drop command header lines ⬡ webpack build + .filter((line) => !/^\s*⬡\s+webpack\s+\w/.test(line)) + // Convert section headers " ⬡ System" → " System:" + // so legacy toContain("System:") assertions still pass + .map((line) => line.replace(/^\s{2}⬡\s+(.+)$/, (_, title) => ` ${title}:`)) + // Drop known command description lines + .filter( + (line) => + !/^\s*(Compiling your application|Watching for file changes|Starting the development server|Validating your webpack configuration|Installed package versions|System and environment information)\s*[….]?\s*$/.test( + line, + ), + ) + // Drop status icon prefixes but keep the message + .map((line) => line.replace(/^\s{2}[✔✖⚠ℹ]\s+/, "")) + // Strip the 2-space indent the renderer adds to stats lines + .map((line) => (line.startsWith(" ") ? line.slice(2) : line)) + .join("\n") + .replaceAll(/\n{3,}/g, "\n\n") + .trim() + ); +} + const normalizeVersions = (output) => output.replaceAll( /(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/gi, @@ -260,6 +307,7 @@ const normalizeStdout = (stdout) => { } let normalizedStdout = stripVTControlCharacters(stdout); + normalizedStdout = stripRendererChrome(normalizedStdout); normalizedStdout = normalizeCwd(normalizedStdout); normalizedStdout = normalizeVersions(normalizedStdout); normalizedStdout = normalizeError(normalizedStdout); @@ -280,6 +328,7 @@ const normalizeStderr = (stderr) => { } let normalizedStderr = stripVTControlCharacters(stderr); + normalizedStderr = stripRendererChrome(normalizedStderr); normalizedStderr = normalizeCwd(normalizedStderr); normalizedStderr = normalizedStderr.replaceAll(IPV4, "x.x.x.x"); @@ -392,5 +441,6 @@ module.exports = { run, runPromptWithAnswers, runWatch, + stripRendererChrome, uniqueDirectoryForTest, }; diff --git a/test/version/basic.test.js b/test/version/basic.test.js index efa056eddf6..5be754fe757 100644 --- a/test/version/basic.test.js +++ b/test/version/basic.test.js @@ -15,7 +15,7 @@ describe("basic usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("webpack:"); + expect(stdout).toContain("webpack"); }); it("should work with --version", async () => { @@ -23,7 +23,7 @@ describe("basic usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("webpack:"); + expect(stdout).toContain("webpack"); }); it("should work with -v alias", async () => { @@ -31,7 +31,7 @@ describe("basic usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("webpack:"); + expect(stdout).toContain("webpack"); }); it("should work and gets more info in project root", async () => { @@ -39,7 +39,7 @@ describe("basic usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("webpack:"); + expect(stdout).toContain("webpack"); }); it("shows an appropriate warning on supplying unknown args", async () => { diff --git a/test/version/output.test.js b/test/version/output.test.js index cfc1d9b5e98..01242dc5e6e 100644 --- a/test/version/output.test.js +++ b/test/version/output.test.js @@ -1,7 +1,7 @@ "use strict"; const { join } = require("node:path"); -const { run } = require("../utils/test-utils"); +const { run, stripRendererChrome } = require("../utils/test-utils"); describe("'-o, --output ' usage", () => { it("gets info text by default", async () => { @@ -9,7 +9,7 @@ describe("'-o, --output ' usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain("webpack:"); + expect(stdout).toContain("webpack"); }); it("gets info as json", async () => { @@ -20,7 +20,7 @@ describe("'-o, --output ' usage", () => { expect(exitCode).toBe(0); expect(stderr).toBeFalsy(); - expect(stdout).toContain('"Packages":'); + expect(stripRendererChrome(stdout)).toContain('"Packages":'); const parse = () => { const output = JSON.parse(stdout);