Added link=“prefetch” tags
This commit is contained in:
@@ -3,6 +3,7 @@ var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
var ManifestPlugin = require('webpack-manifest-plugin');
|
||||
|
||||
commonWebpackConfig = require('./webpack.config');
|
||||
|
||||
@@ -17,27 +18,23 @@ productionWebpackConfig = Object.assign(commonWebpackConfig, {
|
||||
},
|
||||
stats: "normal"
|
||||
});
|
||||
productionWebpackConfig.plugins.push(
|
||||
productionWebpackConfig.plugins = [
|
||||
...productionWebpackConfig.plugins,
|
||||
new ManifestPlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'server/static/index.html',
|
||||
})
|
||||
);
|
||||
productionWebpackConfig.plugins.push(
|
||||
new ExtractTextPlugin({ filename: 'styles.[hash].css' })
|
||||
);
|
||||
productionWebpackConfig.plugins.push(
|
||||
}),
|
||||
new ExtractTextPlugin({ filename: 'styles.[hash].css' }),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
sourceMap: true,
|
||||
})
|
||||
);
|
||||
productionWebpackConfig.plugins.push(
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
URL: JSON.stringify(process.env.URL),
|
||||
NODE_ENV: JSON.stringify('production'),
|
||||
GOOGLE_ANALYTICS_ID: JSON.stringify(process.env.GOOGLE_ANALYTICS_ID),
|
||||
},
|
||||
})
|
||||
);
|
||||
}),
|
||||
];
|
||||
|
||||
module.exports = productionWebpackConfig;
|
||||
|
||||
Reference in New Issue
Block a user