File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
test/cases/optimize/side-effects-scope-hoisting Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,13 @@ class ModuleConcatenationPlugin {
286286 }
287287 compilation . modules . push ( newModule ) ;
288288 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 ;
290296 }
291297 // TODO: remove when LTS node version contains fixed v8 version
292298 // @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