Skip to content

Commit

Permalink
update: build
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxiaofei.666 committed Feb 27, 2020
1 parent 59ba32c commit 2c90dc1
Show file tree
Hide file tree
Showing 10 changed files with 3,690 additions and 3,706 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
/docs

# local env files
.env.local
Expand Down
1 change: 0 additions & 1 deletion docs/css/app.1825752a.css

This file was deleted.

1 change: 0 additions & 1 deletion docs/css/chunk-vendors.62d9640c.css

This file was deleted.

2 changes: 0 additions & 2 deletions docs/js/app.e17e132f.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/js/app.e17e132f.js.map

This file was deleted.

67 changes: 0 additions & 67 deletions docs/js/chunk-vendors.1ddfeda5.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/js/chunk-vendors.1ddfeda5.js.map

This file was deleted.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@
},
"dependencies": {
"axios": "0.18.1",
"core-js": "^2.6.5",
"core-js": "^3.6.4",
"driver.js": "^0.9.6",
"echarts": "^4.2.1",
"element-ui": "^2.9.1",
"echarts": "^4.6.0",
"element-ui": "^2.13.0",
"file-saver": "^2.0.1",
"js-cookie": "^2.2.0",
"vue": "^2.6.10",
"vue": "^2.6.11",
"vue-grid-layout": "^2.3.4",
"vue-router": "^3.0.6",
"vue-router": "^3.1.6",
"vuedraggable": "^2.21.0",
"vuex": "^3.1.1",
"xlsx": "^0.14.3"
"xlsx": "^0.15.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.7.0",
"@vue/cli-plugin-eslint": "^3.7.0",
"@vue/cli-service": "^3.7.0",
"@vue/cli-plugin-babel": "^4.2.3",
"@vue/cli-plugin-eslint": "^4.2.3",
"@vue/cli-service": "^4.2.3",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.2.2",
Expand Down
24 changes: 24 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function resolve(dir) {
module.exports = {
publicPath: '/',
outputDir: 'docs',
productionSourceMap: false,
chainWebpack(config) {
// set svg-sprite-loader
config.module
Expand All @@ -24,5 +25,28 @@ module.exports = {
symbolId: 'icon-[name]'
})
.end()
config
.optimization.splitChunks({
chunks: 'all',
cacheGroups: {
libs: {
name: 'chunk-libs',
test: /[\\/]node_modules[\\/]/,
priority: 10,
chunks: 'initial' // only package third parties that are initially dependent
},
elementUI: {
name: 'chunk-elementUI', // split elementUI into a single package
priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
},
ECharts: {
name: 'chunk-ECharts',
priority: 20,
test: /[\\/]node_modules[\\/]_?echarts(.*)/ // in order to adapt to cnpm
}
}
})
// config.optimization.runtimeChunk('single')
}
}
Loading

0 comments on commit 2c90dc1

Please sign in to comment.