Skip to content

Commit 26dcb98

Browse files
committedMar 19, 2018
fix(compiler): Set single entry name #895
1 parent 8131d8b commit 26dcb98

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎lib/compiler.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*
66
*/
77
'use strict';
8-
const _ = require('lodash');
98
const path = require('path');
109
const NodeTemplatePlugin = require('webpack/lib/node/NodeTemplatePlugin');
1110
const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin');
@@ -37,7 +36,7 @@ module.exports.compileTemplate = function compileTemplate (template, context, ou
3736
publicPath: compilation.outputOptions.publicPath
3837
};
3938
// 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]);
4140
// Create an additional child compiler which takes the template
4241
// and turns it into an Node.JS html factory.
4342
// This allows us to use loaders during the compilation
@@ -47,7 +46,7 @@ module.exports.compileTemplate = function compileTemplate (template, context, ou
4746
new NodeTemplatePlugin(outputOptions).apply(childCompiler);
4847
new NodeTargetPlugin().apply(childCompiler);
4948
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);
5150
new LoaderTargetPlugin('node').apply(childCompiler);
5251

5352
// Fix for "Uncaught TypeError: __webpack_require__(...) is not a function"

0 commit comments

Comments
 (0)
Please sign in to comment.