Skip to content

Commit

Permalink
chore: upgrade dependencies package
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoluoboding committed Nov 22, 2019
1 parent 8eef0a2 commit f10d99e
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 78 deletions.
2 changes: 0 additions & 2 deletions .browserslistrc

This file was deleted.

8 changes: 1 addition & 7 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
let plugins = []
// 生产模式使用 transform-remove-console 插件
if (process.env.NODE_ENV === 'production') {
plugins.push("transform-remove-console")
}
module.exports = {
presets: [
"@vue/cli-plugin-babel/preset"
],
plugins
]
}
134 changes: 76 additions & 58 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {
"core-js": "^3.3.2",
"screenfull": "^4.2.1",
"vue-grid-layout": "^2.3.4"
"vue-grid-layout": "^2.3.7"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.0.5",
Expand All @@ -33,6 +33,7 @@
"echarts": "^4.2.1",
"element-ui": "^2.11.1",
"eslint": "^5.16.0",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-vue": "^5.0.0",
"less": "^3.0.4",
"less-loader": "^4.1.0",
Expand All @@ -47,7 +48,7 @@
"vuex": "^3.0.1"
},
"peerDependencies": {
"vue": "^2.5.0"
"vue": "^2.6.10"
},
"keywords": [
"widget",
Expand All @@ -56,5 +57,14 @@
"vue",
"draggable",
"resizable"
],
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
5 changes: 0 additions & 5 deletions postcss.config.js

This file was deleted.

11 changes: 7 additions & 4 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ const setChainWebpack = config => {
config.performance
.set('maxEntrypointSize', 2500000)
.set('maxAssetSize', 2000000)
// 压缩代码
config.optimization.minimize(true)
// drop console
config.optimization.minimizer('terser').tap((args) => {
args[0].terserOptions.compress.drop_console = true
return args
})
}
}

Expand All @@ -55,7 +58,7 @@ const setConfigureWebpack = config => {
vue: 'vue'
}
]
return isLib ? { externals } : {}
config.externals = [ ...config.externals, ...externals ]
}

module.exports = {
Expand All @@ -68,7 +71,7 @@ module.exports = {
lintOnSave: true,
productionSourceMap: false,
chainWebpack: config => setChainWebpack(config),
configureWebpack: config => setConfigureWebpack(config),
configureWebpack: config => isLib ? setConfigureWebpack(config) : {},
css: {
extract: false
},
Expand Down

0 comments on commit f10d99e

Please sign in to comment.