forked from AkkomaGang/admin-fe
refactor:refine webpack.prod.conf.js
This commit is contained in:
parent
61deec548c
commit
61095a9f2c
2 changed files with 4 additions and 6 deletions
5
.babelrc
5
.babelrc
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
"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',
|
||||
|
|
Loading…
Reference in a new issue