diff --git a/OPTIONS.md b/OPTIONS.md index 3d742a08dee..6b68c06e171 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -8,6 +8,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret for loading the config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. -h, --hot [value] Enables Hot Module Replacement diff --git a/package.json b/package.json index 4e6698862c3..f5201bdc60d 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "pretest": "yarn build && yarn lint && yarn prepsuite", "test": "jest --reporters=default", "test:smoketests": "nyc node smoketests", - "test:coverage": "nyc --no-clean --require ts-node/register jest", + "test:coverage": "nyc --no-clean jest", "test:cli": "jest test --reporters=default", "test:packages": "jest packages/ --reporters=default", "test:ci": "yarn test:cli && yarn test:packages", diff --git a/packages/webpack-cli/src/types.ts b/packages/webpack-cli/src/types.ts index f61f8138b39..e34f061d478 100644 --- a/packages/webpack-cli/src/types.ts +++ b/packages/webpack-cli/src/types.ts @@ -175,6 +175,7 @@ type WebpackDevServerOptions = DevServerConfig & merge?: boolean; config: string[]; configName?: string[]; + disableInterpret?: boolean; argv: Argv; }; diff --git a/packages/webpack-cli/src/webpack-cli.ts b/packages/webpack-cli/src/webpack-cli.ts index 36ef3eb947f..7ca69f7334c 100644 --- a/packages/webpack-cli/src/webpack-cli.ts +++ b/packages/webpack-cli/src/webpack-cli.ts @@ -697,6 +697,7 @@ class WebpackCLI implements IWebpackCLI { "config", "config-name", "merge", + "disable-interpret", "env", "mode", "watch", @@ -746,6 +747,16 @@ class WebpackCLI implements IWebpackCLI { ], description: "Merge two or more configurations using 'webpack-merge'.", }, + { + name: "disable-interpret", + configs: [ + { + type: "enum", + values: [true], + }, + ], + description: "Disable interpret a config file.", + }, // Complex configs { name: "env", @@ -1775,12 +1786,15 @@ class WebpackCLI implements IWebpackCLI { } async loadConfig(options: Partial) { + const disableInterpret = + typeof options.disableInterpret !== "undefined" && options.disableInterpret; + const interpret = require("interpret"); const loadConfigByPath = async (configPath: string, argv: Argv = {}) => { const ext = path.extname(configPath); const interpreted = Object.keys(interpret.jsVariants).find((variant) => variant === ext); - if (interpreted) { + if (interpreted && !disableInterpret) { const rechoir: Rechoir = require("rechoir"); try { diff --git a/test/build/config-format/disable-interpret/disable-interpret.test.js b/test/build/config-format/disable-interpret/disable-interpret.test.js new file mode 100644 index 00000000000..846a15806d7 --- /dev/null +++ b/test/build/config-format/disable-interpret/disable-interpret.test.js @@ -0,0 +1,32 @@ +const { run } = require("../../../utils/test-utils"); +const { existsSync, unlinkSync } = require("fs"); +const { resolve } = require("path"); + +// eslint-disable-next-line node/no-unpublished-require +const execa = require("execa"); +const { sync: spawnSync } = execa; + +describe("webpack cli", () => { + it('should work with the "disable-interpret" option from flags', async () => { + const configFileName = "webpack.config"; + const configFilePath = resolve(__dirname, `${configFileName}.ts`); + const buildScripts = spawnSync("yarn", ["tsc", configFilePath]); + expect(buildScripts.stdout).toBeTruthy(); + + const { exitCode, stderr, stdout } = await run(__dirname, ["--disable-interpret"]); + unlinkSync(resolve(__dirname, `${configFileName}.js`)); + + expect(stderr).toBeFalsy(); + expect(stdout).toBeTruthy(); + expect(exitCode).toBe(0); + expect(existsSync(resolve(__dirname, "dist/foo.bundle.js"))).toBeTruthy(); + }); + + it("should log error without transpilation", async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ["--disable-interpret"]); + + expect(exitCode).toBe(2); + expect(stderr).toContain(`Failed to load '${resolve(__dirname, "webpack.config.ts")}' config`); + expect(stdout).toBeFalsy(); + }); +}); diff --git a/test/build/config-format/disable-interpret/main.ts b/test/build/config-format/disable-interpret/main.ts new file mode 100644 index 00000000000..41d13d1a9a1 --- /dev/null +++ b/test/build/config-format/disable-interpret/main.ts @@ -0,0 +1 @@ +console.log("Main typescript file"); diff --git a/test/build/config-format/disable-interpret/tsconfig.json b/test/build/config-format/disable-interpret/tsconfig.json new file mode 100644 index 00000000000..391488ab17f --- /dev/null +++ b/test/build/config-format/disable-interpret/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "module": "commonjs" + } +} diff --git a/test/build/config-format/disable-interpret/webpack.config.ts b/test/build/config-format/disable-interpret/webpack.config.ts new file mode 100644 index 00000000000..22f8d9130fe --- /dev/null +++ b/test/build/config-format/disable-interpret/webpack.config.ts @@ -0,0 +1,14 @@ +/* eslint-disable node/no-unsupported-features/es-syntax */ +/** eslint-disable **/ +import * as path from "path"; + +const config = { + mode: "production", + entry: "./main.ts", + output: { + path: path.resolve(__dirname, "dist"), + filename: "foo.bundle.js", + }, +}; + +export = config; diff --git a/test/build/config-format/typescript/typescript.test.js b/test/build/config-format/typescript/typescript.test.js index 02a630653b9..40ecd1cb094 100644 --- a/test/build/config-format/typescript/typescript.test.js +++ b/test/build/config-format/typescript/typescript.test.js @@ -4,7 +4,9 @@ const { resolve } = require("path"); describe("webpack cli", () => { it("should support typescript file", async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ["-c", "./webpack.config.ts"]); + const { exitCode, stderr, stdout } = await run(__dirname, ["-c", "./webpack.config.ts"], { + nodeOptions: ["--require=ts-node/register"], + }); expect(stderr).toBeFalsy(); expect(stdout).toBeTruthy(); diff --git a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 index e0f25790a14..b4f76212389 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 @@ -97,6 +97,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -152,6 +153,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -207,6 +209,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -261,6 +264,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -303,6 +307,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -347,6 +352,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -398,6 +404,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -447,6 +454,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -489,6 +497,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1409,6 +1418,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1479,6 +1489,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1551,6 +1562,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -1636,6 +1648,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -1719,6 +1732,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1789,6 +1803,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1859,6 +1874,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1929,6 +1945,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2039,6 +2056,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2079,6 +2097,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2121,6 +2140,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -2170,6 +2190,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -2217,6 +2238,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2257,6 +2279,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2298,6 +2321,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2353,6 +2377,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2580,6 +2605,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2633,6 +2659,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. diff --git a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 index 98fe231863c..c2c718b9b09 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 @@ -97,6 +97,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -153,6 +154,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -209,6 +211,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -264,6 +267,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -307,6 +311,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -352,6 +357,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -404,6 +410,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -454,6 +461,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -497,6 +505,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1418,6 +1427,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1489,6 +1499,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1562,6 +1573,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -1648,6 +1660,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -1732,6 +1745,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1803,6 +1817,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1874,6 +1889,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1945,6 +1961,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2056,6 +2073,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2097,6 +2115,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2140,6 +2159,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -2190,6 +2210,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -2238,6 +2259,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2279,6 +2301,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2321,6 +2344,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2377,6 +2401,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2623,6 +2648,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2677,6 +2703,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 index 80a1cbe8e8f..8e9d9df18f9 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 @@ -97,6 +97,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -152,6 +153,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -207,6 +209,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -261,6 +264,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -303,6 +307,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -347,6 +352,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -398,6 +404,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -447,6 +454,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -489,6 +497,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1465,6 +1474,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1505,6 +1515,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1547,6 +1558,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -1596,6 +1608,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -1643,6 +1656,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1683,6 +1697,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1724,6 +1739,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1779,6 +1795,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2006,6 +2023,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2059,6 +2077,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 index 4bcba0c85b4..9261fd56e49 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 @@ -97,6 +97,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -153,6 +154,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -209,6 +211,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -264,6 +267,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -307,6 +311,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -352,6 +357,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -404,6 +410,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -454,6 +461,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -497,6 +505,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1474,6 +1483,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1515,6 +1525,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1558,6 +1569,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -1608,6 +1620,7 @@ Options: --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. @@ -1656,6 +1669,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1697,6 +1711,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1739,6 +1754,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -1795,6 +1811,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2041,6 +2058,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build. @@ -2095,6 +2113,7 @@ Options: -c, --config Provide path to a webpack configuration file e.g. ./webpack.config.js. --config-name Name of the configuration to use. -m, --merge Merge two or more configurations using 'webpack-merge'. + --disable-interpret Disable interpret a config file. --env Environment passed to the configuration when it is a function. --node-env Sets process.env.NODE_ENV to the specified value. --progress [value] Print compilation progress during build.