Skip to content

Commit 959c31c

Browse files
committed
fix(webpack): don't use html-plugin in test
fixes #2374
1 parent 7781910 commit 959c31c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

templates/app/webpack.make.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -321,15 +321,17 @@ module.exports = function makeWebpackConfig(options) {
321321
// Skip rendering index.html in test mode
322322
// Reference: https://github.com/ampedandwired/html-webpack-plugin
323323
// Render index.html
324-
let htmlConfig = {
325-
template: 'client/_index.html',
326-
filename: '../client/index.html',
327-
alwaysWriteToDisk: true
324+
if(!TEST) {
325+
let htmlConfig = {
326+
template: 'client/_index.html',
327+
filename: '../client/index.html',
328+
alwaysWriteToDisk: true
329+
}
330+
config.plugins.push(
331+
new HtmlWebpackPlugin(htmlConfig),
332+
new HtmlWebpackHarddiskPlugin()
333+
);
328334
}
329-
config.plugins.push(
330-
new HtmlWebpackPlugin(htmlConfig),
331-
new HtmlWebpackHarddiskPlugin()
332-
);
333335

334336
// Add build specific plugins
335337
if(BUILD) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy