Skip to content

Commit

Permalink
fix: correct the minimum help output (#4057)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 authored Jan 19, 2024
1 parent aed6220 commit c727c4f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 26 deletions.
15 changes: 14 additions & 1 deletion OPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Options:
--cache-name <value> 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 <value> When to store data to the filesystem. (pack: Store data when compiler is idle in a single file).
--cache-version <value> 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 <value> The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.
Expand Down Expand Up @@ -98,7 +100,6 @@ Options:
--no-experiments-sync-web-assembly Negative 'experiments-sync-web-assembly' option.
--experiments-top-level-await Allow using top-level-await in EcmaScript Modules.
--no-experiments-top-level-await Negative 'experiments-top-level-await' option.
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
--extends-reset Clear all items provided in 'extends' configuration. Extend configuration from another configuration (only works when using webpack-cli).
--externals <value...> Every matched dependency becomes external. An exact matched dependency becomes external. The same string is used as external dependency.
--externals-reset Clear all items provided in 'externals' configuration. Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.
Expand Down Expand Up @@ -168,6 +169,8 @@ Options:
--no-module-parser-javascript-commonjs-magic-comments Negative 'module-parser-javascript-commonjs-magic-comments' option.
--module-parser-javascript-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
--no-module-parser-javascript-create-require Negative 'module-parser-javascript-create-require' option.
--module-parser-javascript-dynamic-import-fetch-priority <value> Specifies global fetchPriority for dynamic import.
--no-module-parser-javascript-dynamic-import-fetch-priority Negative 'module-parser-javascript-dynamic-import-fetch-priority' option.
--module-parser-javascript-dynamic-import-mode <value> Specifies global mode for dynamic import.
--module-parser-javascript-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import.
--no-module-parser-javascript-dynamic-import-prefetch Negative 'module-parser-javascript-dynamic-import-prefetch' option.
Expand Down Expand Up @@ -241,6 +244,8 @@ Options:
--no-module-parser-javascript-auto-commonjs-magic-comments Negative 'module-parser-javascript-auto-commonjs-magic-comments' option.
--module-parser-javascript-auto-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
--no-module-parser-javascript-auto-create-require Negative 'module-parser-javascript-auto-create-require' option.
--module-parser-javascript-auto-dynamic-import-fetch-priority <value> Specifies global fetchPriority for dynamic import.
--no-module-parser-javascript-auto-dynamic-import-fetch-priority Negative 'module-parser-javascript-auto-dynamic-import-fetch-priority' option.
--module-parser-javascript-auto-dynamic-import-mode <value> Specifies global mode for dynamic import.
--module-parser-javascript-auto-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import.
--no-module-parser-javascript-auto-dynamic-import-prefetch Negative 'module-parser-javascript-auto-dynamic-import-prefetch' option.
Expand Down Expand Up @@ -314,6 +319,8 @@ Options:
--no-module-parser-javascript-dynamic-commonjs-magic-comments Negative 'module-parser-javascript-dynamic-commonjs-magic-comments' option.
--module-parser-javascript-dynamic-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
--no-module-parser-javascript-dynamic-create-require Negative 'module-parser-javascript-dynamic-create-require' option.
--module-parser-javascript-dynamic-dynamic-import-fetch-priority <value> Specifies global fetchPriority for dynamic import.
--no-module-parser-javascript-dynamic-dynamic-import-fetch-priority Negative 'module-parser-javascript-dynamic-dynamic-import-fetch-priority' option.
--module-parser-javascript-dynamic-dynamic-import-mode <value> Specifies global mode for dynamic import.
--module-parser-javascript-dynamic-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import.
--no-module-parser-javascript-dynamic-dynamic-import-prefetch Negative 'module-parser-javascript-dynamic-dynamic-import-prefetch' option.
Expand Down Expand Up @@ -387,6 +394,8 @@ Options:
--no-module-parser-javascript-esm-commonjs-magic-comments Negative 'module-parser-javascript-esm-commonjs-magic-comments' option.
--module-parser-javascript-esm-create-require [value] Enable/disable parsing "import { createRequire } from "module"" and evaluating createRequire().
--no-module-parser-javascript-esm-create-require Negative 'module-parser-javascript-esm-create-require' option.
--module-parser-javascript-esm-dynamic-import-fetch-priority <value> Specifies global fetchPriority for dynamic import.
--no-module-parser-javascript-esm-dynamic-import-fetch-priority Negative 'module-parser-javascript-esm-dynamic-import-fetch-priority' option.
--module-parser-javascript-esm-dynamic-import-mode <value> Specifies global mode for dynamic import.
--module-parser-javascript-esm-dynamic-import-prefetch [value] Specifies global prefetch for dynamic import.
--no-module-parser-javascript-esm-dynamic-import-prefetch Negative 'module-parser-javascript-esm-dynamic-import-prefetch' option.
Expand Down Expand Up @@ -626,8 +635,12 @@ Options:
--no-output-environment-destructuring Negative 'output-environment-destructuring' option.
--output-environment-dynamic-import The environment supports an async import() function to import EcmaScript modules.
--no-output-environment-dynamic-import Negative 'output-environment-dynamic-import' option.
--output-environment-dynamic-import-in-worker The environment supports an async import() is available when creating a worker.
--no-output-environment-dynamic-import-in-worker Negative 'output-environment-dynamic-import-in-worker' option.
--output-environment-for-of The environment supports 'for of' iteration ('for (const x of array) { ... }').
--no-output-environment-for-of Negative 'output-environment-for-of' option.
--output-environment-global-this The environment supports 'globalThis'.
--no-output-environment-global-this Negative 'output-environment-global-this' option.
--output-environment-module The environment supports EcmaScript Module syntax to import EcmaScript modules (import ... from '...').
--no-output-environment-module Negative 'output-environment-module' option.
--output-environment-optional-chaining The environment supports optional chaining ('obj?.a' or 'obj?.()').
Expand Down
1 change: 0 additions & 1 deletion SERVE-OPTIONS-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Options:
-d, --devtool <value> A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
--no-devtool Negative 'devtool' option.
--entry <value...> A module that is loaded upon startup. Only the last one is exported.
--extends <value...> Path to the configuration to be extended (only works when using webpack-cli).
--mode <value> Enable production optimizations or development hints.
--name <value> Name of the configuration. Used when loading multiple configurations.
-o, --output-path <value> The output directory as **absolute path** (required).
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack-cli/src/webpack-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,7 @@ class WebpackCLI implements IWebpackCLI {
},
];

// Options from webpack core to be included in the minimum help output
const minimumHelpFlags = [
"mode",
"watch",
Expand All @@ -1062,7 +1063,6 @@ class WebpackCLI implements IWebpackCLI {
"target",
"name",
"output-path",
"extends",
];

// Extract all the flags being exported from core.
Expand Down
Loading

0 comments on commit c727c4f

Please sign in to comment.