Skip to content

Commit 2b31686

Browse files
committed
fix: use webpack sources of the current webpack compiler instance
1 parent f77d06a commit 2b31686

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/child-compiler.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
*
1212
*/
1313
'use strict';
14-
const NodeTemplatePlugin = require('webpack/lib/node/NodeTemplatePlugin');
15-
const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin');
16-
const LoaderTargetPlugin = require('webpack/lib/LoaderTargetPlugin');
17-
const SingleEntryPlugin = require('webpack/lib/SingleEntryPlugin');
1814

1915
let instanceId = 0;
2016
/**
@@ -79,6 +75,11 @@ class HtmlWebpackChildCompiler {
7975
const webpack = mainCompilation.compiler.webpack;
8076
const Compilation = webpack.Compilation;
8177

78+
const NodeTemplatePlugin = webpack.node.NodeTemplatePlugin;
79+
const NodeTargetPlugin = webpack.node.NodeTargetPlugin;
80+
const LoaderTargetPlugin = webpack.LoaderTargetPlugin;
81+
const SingleEntryPlugin = webpack.SingleEntryPlugin;
82+
8283
// To prevent multiple compilations for the same template
8384
// the compilation is cached in a promise.
8485
// If it already exists return

0 commit comments

Comments
 (0)