Skip to content

Commit 48524bf

Browse files
author
Vladislav Tarasov
committed
fix: template is undefined in webpack 4
1 parent d31013d commit 48524bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,9 @@ class MiniCssExtractPlugin {
619619
}
620620
});
621621

622-
const { Template } = webpack;
622+
const Template = webpack.Template
623+
? webpack.Template
624+
: webpack.webpack.Template;
623625
const { mainTemplate } = compilation;
624626

625627
if (isWebpack4) {

0 commit comments

Comments
 (0)