Skip to content

Commit bc45db0

Browse files
fix: point the moved WebpackOptionsApply at hot/ from its new depth
`hot/` is at the repo root, so the three `require.resolve` specifiers reaching it need one more level from `lib/config/` than from `lib/` root. They were missed because two sit inside a ternary and one is a template literal, none of them adjacent to `require(`, which is what the path rewrite matched on. Bundling `lib/index.js` reported each as a failed resolve, leaving only the three optional image encoders `test/cases/large/big-assets` already expects.
1 parent 0942086 commit bc45db0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎lib/config/WebpackOptionsApply.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ class WebpackOptionsApply extends OptionsApply {
552552
compiler.platform.web === null;
553553

554554
if (isUniversalTarget) {
555-
const emitter = require.resolve("../hot/emitter-event-target.js");
555+
const emitter = require.resolve("../../hot/emitter-event-target.js");
556556

557557
const NormalModuleReplacementPlugin = require("../resolve/NormalModuleReplacementPlugin");
558558

@@ -573,8 +573,8 @@ class WebpackOptionsApply extends OptionsApply {
573573

574574
const backend = require.resolve(
575575
isUniversalTarget
576-
? "../hot/lazy-compilation-universal.js"
577-
: `../hot/lazy-compilation-${
576+
? "../../hot/lazy-compilation-universal.js"
577+
: `../../hot/lazy-compilation-${
578578
options.externalsPresets.node ? "node" : "web"
579579
}.js`
580580
);

0 commit comments

Comments
 (0)