Skip to content

Commit

Permalink
Chore: 构建速度
Browse files Browse the repository at this point in the history
  • Loading branch information
Maorey committed Nov 26, 2019
1 parent 448650c commit 76cddcf
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 80 deletions.
3 changes: 3 additions & 0 deletions build/development.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ module.exports = function(config) {
// return `webpack://${info.namespace}/${fileName}`
// })

/// 文件监听 ///
config.watchOptions({ ignored: /node_modules/ })

/// 插件 ///
// html-webpack-plugin
// 想要直接放到body后html前啊... inject: false、'head'、true(='body')
Expand Down
14 changes: 14 additions & 0 deletions build/production.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ function plugin(config, DIR) {
extension: ['.*'], // 文件后缀
},
])
// dll
const hardSource = require('hard-source-webpack-plugin')
config.plugin('hard-source').use(hardSource)
// 需要 【webpack.config.js】 webpack-cli webpack-command
// config.plugin('hard-source-parallel').use(hardSource.ParallelModulePlugin)
config
.plugin('hard-source-exclude')
.use(hardSource.ExcludeModulePlugin, [
[
{ test: /[\\/]mini-css-extract-plugin[\\/]dist[\\/]loader/ },
{ test: /[\\/]file-loader[\\/]/ },
{ test: /[\\/]url-loader[\\/]/ },
],
])
}

/** webpack 配置
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"type": "commonjs",
"name": "vue-tpl",
"author": "毛瑞 <[email protected]>",
"version": "0.1.2",
"version": "0.1.3",
"private": false,
"license": "MIT",
"keywords": [
Expand Down Expand Up @@ -31,7 +30,7 @@
"axios": "^0.19.0",
"core-js": "^3.4.2",
"crypto-js": "^3.1.9-1",
"d3": "^5.14.1",
"d3": "^5.14.2",
"echarts": "^4.5.0",
"element-ui": "^2.12.0",
"jsencrypt": "^3.0.0-rc.1",
Expand All @@ -58,8 +57,8 @@
"@types/d3": "^5.7.2",
"@types/echarts": "^4.4.1",
"@types/jest": "^24.0.23",
"@typescript-eslint/eslint-plugin": "^2.8.0",
"@typescript-eslint/parser": "^2.8.0",
"@typescript-eslint/eslint-plugin": "^2.9.0",
"@typescript-eslint/parser": "^2.9.0",
"@vue/cli-plugin-babel": "^4.0.5",
"@vue/cli-plugin-e2e-cypress": "^4.0.5",
"@vue/cli-plugin-eslint": "^4.0.5",
Expand All @@ -70,16 +69,17 @@
"@vue/cli-plugin-vuex": "^4.0.5",
"@vue/cli-service": "^4.0.5",
"@vue/eslint-config-standard": "^5.0.0",
"@vue/eslint-config-typescript": "^5.0.0",
"@vue/eslint-config-typescript": "^5.0.1",
"@vue/test-utils": "^1.0.0-beta.29",
"compression-webpack-plugin": "^3.0.0",
"eslint": "^6.6.0",
"eslint": "^6.7.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.0.1",
"fibers": "^4.0.2",
"hard-source-webpack-plugin": "^0.13.1",
"lint-staged": "^9.4.3",
"regenerate": "^1.4.0",
"regjsgen": "^0.5.1",
Expand Down
13 changes: 5 additions & 8 deletions src/pages/other/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,6 @@
background: $colorScrollBarHover;
}
}
// 鼠标提示
.el-tooltip__popper {
z-index: $zComp !important;
}
// 弹出框
.el-popover {
z-index: $zMenu !important;
}
// 通知
.el-notification {
position: fixed;
Expand All @@ -107,3 +99,8 @@
z-index: $zMessage !important;
margin-top: $heightHeader;
}
// 鼠标提示&弹出框
.el-popover,
.el-tooltip__popper {
z-index: $zTop !important;
}
Loading

0 comments on commit 76cddcf

Please sign in to comment.