5
5
*
6
6
*/
7
7
'use strict' ;
8
- const _ = require ( 'lodash' ) ;
9
8
const path = require ( 'path' ) ;
10
9
const NodeTemplatePlugin = require ( 'webpack/lib/node/NodeTemplatePlugin' ) ;
11
10
const NodeTargetPlugin = require ( 'webpack/lib/node/NodeTargetPlugin' ) ;
@@ -37,7 +36,7 @@ module.exports.compileTemplate = function compileTemplate (template, context, ou
37
36
publicPath : compilation . outputOptions . publicPath
38
37
} ;
39
38
// Store the result of the parent compilation before we start the child compilation
40
- const assetsBeforeCompilation = _ . assign ( { } , compilation . assets [ outputOptions . filename ] ) ;
39
+ const assetsBeforeCompilation = Object . assign ( { } , compilation . assets [ outputOptions . filename ] ) ;
41
40
// Create an additional child compiler which takes the template
42
41
// and turns it into an Node.JS html factory.
43
42
// This allows us to use loaders during the compilation
@@ -47,7 +46,7 @@ module.exports.compileTemplate = function compileTemplate (template, context, ou
47
46
new NodeTemplatePlugin ( outputOptions ) . apply ( childCompiler ) ;
48
47
new NodeTargetPlugin ( ) . apply ( childCompiler ) ;
49
48
new LibraryTemplatePlugin ( 'HTML_WEBPACK_PLUGIN_RESULT' , 'var' ) . apply ( childCompiler ) ;
50
- new SingleEntryPlugin ( this . context , template ) . apply ( childCompiler ) ;
49
+ new SingleEntryPlugin ( this . context , template , compilerName ) . apply ( childCompiler ) ;
51
50
new LoaderTargetPlugin ( 'node' ) . apply ( childCompiler ) ;
52
51
53
52
// Fix for "Uncaught TypeError: __webpack_require__(...) is not a function"
0 commit comments