@@ -75,7 +75,6 @@ class HtmlWebpackChildCompiler {
7575 const  webpack  =  mainCompilation . compiler . webpack ; 
7676 const  Compilation  =  webpack . Compilation ; 
7777
78-  const  NodeTemplatePlugin  =  webpack . node . NodeTemplatePlugin ; 
7978 const  NodeTargetPlugin  =  webpack . node . NodeTargetPlugin ; 
8079 const  LoaderTargetPlugin  =  webpack . LoaderTargetPlugin ; 
8180 const  EntryPlugin  =  webpack . EntryPlugin ; 
@@ -95,18 +94,17 @@ class HtmlWebpackChildCompiler {
9594 name : 'HTML_WEBPACK_PLUGIN_RESULT' 
9695 } , 
9796 /** @type  {'text/javascript' } */ 
98-  scriptType : ( /** @type  {'text/javascript' } */ 'text/javascript' ) , 
99-  iife : false 
97+  scriptType : ( /** @type  {'text/javascript' } */ 'text/javascript' ) 
10098 } ; 
10199 const  compilerName  =  'HtmlWebpackCompiler' ; 
102100 // Create an additional child compiler which takes the template 
103101 // and turns it into an Node.JS html factory. 
104102 // This allows us to use loaders during the compilation 
105103 const  childCompiler  =  mainCompilation . createChildCompiler ( compilerName ,  outputOptions ,  [ 
106104 // Compile the template to nodejs javascript 
107-  new  NodeTemplatePlugin ( outputOptions ) , 
108105 new  NodeTargetPlugin ( ) , 
109-  new  LoaderTargetPlugin ( 'node' ) 
106+  new  LoaderTargetPlugin ( 'node' ) , 
107+  new  webpack . library . EnableLibraryPlugin ( 'var' ) 
110108 ] ) ; 
111109 // The file path context which webpack uses to resolve all relative files to 
112110 childCompiler . context  =  mainCompilation . compiler . context ; 
0 commit comments