Skip to content

Commit a9cf0d0

Browse files
committed
fix context
1 parent cf52880 commit a9cf0d0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/ContextModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ module.exports = webpackEmptyAsyncContext;`;
10711071
return new OriginalSource(
10721072
sourceString,
10731073
`webpack://${makePathsRelative(
1074-
(compilation && compilation.options.context) || this.context,
1074+
(compilation && compilation.compiler.context) || "",
10751075
this.identifier(),
10761076
compilation && compilation.compiler.root
10771077
)}`

test/__snapshots__/StatsTestCases.basictest.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ exports[`StatsTestCases should print correct stats for concat-and-sideeffects 1`
738738

739739
exports[`StatsTestCases should print correct stats for context-independence 1`] = `
740740
"asset main-1aad2f42f93e93c4e0b4.js 12.7 KiB [emitted] [immutable] (name: main)
741-
sourceMap main-1aad2f42f93e93c4e0b4.js.map 11.1 KiB [emitted] [dev] (auxiliary name: main)
741+
sourceMap main-1aad2f42f93e93c4e0b4.js.map 11 KiB [emitted] [dev] (auxiliary name: main)
742742
asset 695-4dd37417c69a0af66bac.js 455 bytes [emitted] [immutable]
743743
sourceMap 695-4dd37417c69a0af66bac.js.map 342 bytes [emitted] [dev]
744744
runtime modules 6.6 KiB 9 modules
@@ -754,7 +754,7 @@ built modules 500 bytes [built]
754754
webpack x.x.x compiled successfully in X ms
755755
756756
asset main-1aad2f42f93e93c4e0b4.js 12.7 KiB [emitted] [immutable] (name: main)
757-
sourceMap main-1aad2f42f93e93c4e0b4.js.map 11.1 KiB [emitted] [dev] (auxiliary name: main)
757+
sourceMap main-1aad2f42f93e93c4e0b4.js.map 11 KiB [emitted] [dev] (auxiliary name: main)
758758
asset 695-4dd37417c69a0af66bac.js 455 bytes [emitted] [immutable]
759759
sourceMap 695-4dd37417c69a0af66bac.js.map 342 bytes [emitted] [dev]
760760
runtime modules 6.6 KiB 9 modules

0 commit comments

Comments
 (0)