From fb3de8526ac66e35e0e93c26ef8859684fb231c3 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Fri, 9 Sep 2016 09:34:36 -0400 Subject: [PATCH] Don't try to output HTML for redirect routes --- webpack.config.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index b24e76287..a6d403088 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -102,13 +102,16 @@ module.exports = { }, plugins: [ new VersionPlugin({length: 5}) - ].concat(routes.map(function (route) { - return new HtmlWebpackPlugin(defaults({}, require('./src/template-config.js'), { - title: route.title, - filename: route.name + '.html', - route: route - })); - })).concat([ + ].concat(routes + .filter(function (route) {return !route.redirect;}) + .map(function (route) { + return new HtmlWebpackPlugin(defaults({}, require('./src/template-config.js'), { + title: route.title, + filename: route.name + '.html', + route: route + })); + }) + ).concat([ new CopyWebpackPlugin([ {from: 'static'}, {from: 'intl', to: 'js'}