File tree 2 files changed +15
-1
lines changed
test/cases/optimize/side-effects-scope-hoisting
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,13 @@ class ModuleConcatenationPlugin {
286
286
}
287
287
compilation . modules . push ( newModule ) ;
288
288
for ( const reason of newModule . reasons ) {
289
- reason . dependency . module = newModule ;
289
+ if ( reason . dependency . module === concatConfiguration . rootModule )
290
+ reason . dependency . module = newModule ;
291
+ if (
292
+ reason . dependency . redirectedModule ===
293
+ concatConfiguration . rootModule
294
+ )
295
+ reason . dependency . redirectedModule = newModule ;
290
296
}
291
297
// TODO: remove when LTS node version contains fixed v8 version
292
298
// @see https://github.com/webpack/webpack/pull/6613
Original file line number Diff line number Diff line change
1
+ import { a } from "pmodule" ;
2
+
3
+ it ( "should not crash with null id" , function ( ) {
4
+ expect ( a ) . toBe ( "a" ) ;
5
+ } ) ;
6
+
7
+ if ( Math === undefined )
8
+ console . log ( module ) ; // prevent scope hoisting of this module
You can’t perform that action at this time.
0 commit comments