Don't try to output HTML for redirect routes

This commit is contained in:
Ray Schamp 2016-09-09 09:34:36 -04:00
parent c274de7295
commit fb3de8526a

View file

@ -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'}