Skip to content
Snippets Groups Projects
Commit 61095a9f authored by Pan's avatar Pan
Browse files

refactor:refine webpack.prod.conf.js

parent 61deec54
No related branches found
No related tags found
No related merge requests found
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
"modules": false
}],
"stage-2"
],
......
......@@ -27,11 +27,10 @@ var webpackConfig = merge(baseWebpackConfig, {
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[name].[chunkhash].js'),
publicPath: config.build.assetsPublicPath
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env,
......@@ -77,6 +76,8 @@ var webpackConfig = merge(baseWebpackConfig, {
}),
// cache Module Identifiers
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment