Skip to content

Commit

Permalink
nitpicks for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jan 22, 2021
1 parent 1003175 commit c4d41ff
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
8 changes: 5 additions & 3 deletions lib/WebpackOptionsApply.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,11 @@ class WebpackOptionsApply extends OptionsApply {
client:
(typeof options.experiments.lazyCompilation === "object" &&
options.experiments.lazyCompilation.client) ||
`webpack/hot/lazy-compilation-${
options.externalsPresets.node ? "node" : "web"
}.js`,
require.resolve(
`../hot/lazy-compilation-${
options.externalsPresets.node ? "node" : "web"
}.js`
),
entries:
typeof options.experiments.lazyCompilation !== "object" ||
options.experiments.lazyCompilation.entries !== false
Expand Down
17 changes: 15 additions & 2 deletions test/__snapshots__/Cli.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,13 @@ Object {
"experiments-lazy-compilation": Object {
"configs": Array [
Object {
"description": "Compile import()s only when they are accessed.",
"description": "Compile entrypoints and import()s only when they are accessed.",
"multiple": false,
"path": "experiments.lazyCompilation",
"type": "boolean",
},
],
"description": "Compile import()s only when they are accessed.",
"description": "Compile entrypoints and import()s only when they are accessed.",
"multiple": false,
"simpleType": "boolean",
},
Expand All @@ -393,6 +393,19 @@ Object {
"multiple": false,
"simpleType": "string",
},
"experiments-lazy-compilation-entries": Object {
"configs": Array [
Object {
"description": "Enable/disable lazy compilation for entries.",
"multiple": false,
"path": "experiments.lazyCompilation.entries",
"type": "boolean",
},
],
"description": "Enable/disable lazy compilation for entries.",
"multiple": false,
"simpleType": "boolean",
},
"experiments-output-module": Object {
"configs": Array [
Object {
Expand Down

0 comments on commit c4d41ff

Please sign in to comment.