Skip to content

Commit f7cae15

Browse files
committed
fix(e2e): fix some webpack config for e2e
1 parent dd73e59 commit f7cae15

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

templates/app/webpack.make.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
var webpack = require('webpack');
44
var autoprefixer = require('autoprefixer');
55
var HtmlWebpackPlugin = require('html-webpack-plugin');
6+
var HtmlWebpackHarddiskPlugin = require('html-webpack-harddisk-plugin');
67
var ExtractTextPlugin = require('extract-text-webpack-plugin');
78
var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
89
var fs = require('fs');
@@ -72,7 +73,7 @@ module.exports = function makeWebpackConfig(options) {
7273

7374
// Output path from the view of the page
7475
// Uses webpack-dev-server in development
75-
publicPath: BUILD || DEV ? '/' : `http://localhost:${8080}/`,
76+
publicPath: BUILD || DEV || E2E ? '/' : `http://localhost:${8080}/`,
7677
//publicPath: BUILD ? '/' : 'http://localhost:' + env.port + '/',
7778

7879
// Filename for entry points
@@ -305,9 +306,11 @@ module.exports = function makeWebpackConfig(options) {
305306
template: 'client/_index.html'
306307
}
307308
if(E2E) {
308-
htmlConfig.filename = 'client/index.html';
309+
htmlConfig.filename = '../client/index.html';
310+
htmlConfig.alwaysWriteToDisk = true;
309311
}
310312
config.plugins.push(new HtmlWebpackPlugin(htmlConfig));
313+
if(E2E) config.plugins.push(new HtmlWebpackHarddiskPlugin());
311314

312315
// Add build specific plugins
313316
if(BUILD) {

0 commit comments

Comments
 (0)