diff --git a/babel.config.js b/babel.config.js index e955840..4eb72d0 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,13 @@ +const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV) + +const plugins = [] +if (IS_PROD) { + plugins.push('transform-remove-console') +} + module.exports = { presets: [ '@vue/cli-plugin-babel/preset' - ] + ], + plugins } diff --git a/package.json b/package.json index 69e970d..652e756 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,10 @@ "build": "vue-cli-service build", "lint": "vue-cli-service lint", "predeploy": "yarn build", - "deploy": "gh-pages -d dist -b pages -r https://gitee.com/iczer/vue-antd-admin.git" + "deploy": "gh-pages -d dist -b pages -r https://gitee.com/iczer/vue-antd-admin.git", + "docs:dev": "vuepress dev docs", + "docs:build": "vuepress build docs", + "docs:deploy": "vuepress build docs && gh-pages -d docs/.vuepress/dist -b master -r https://gitee.com/iczer/vue-antd-admin-docs.git" }, "dependencies": { "@antv/data-set": "^0.11.4", @@ -26,7 +29,8 @@ "vue-i18n": "^8.18.2", "vue-router": "^3.3.4", "vuedraggable": "^2.23.2", - "vuex": "^3.4.0" + "vuex": "^3.4.0", + "nprogress": "^0.2.0" }, "devDependencies": { "@ant-design/colors": "^4.0.1", @@ -47,7 +51,9 @@ "vue-template-compiler": "^2.6.11", "vuepress": "^1.5.2", "webpack-theme-color-replacer": "^1.3.12", - "whatwg-fetch": "^3.0.0" + "whatwg-fetch": "^3.0.0", + "compression-webpack-plugin": "^2.0.0", + "babel-plugin-transform-remove-console": "^6.9.4" }, "eslintConfig": { "root": true, diff --git a/public/index.html b/public/index.html index 61725f6..719a471 100644 --- a/public/index.html +++ b/public/index.html @@ -6,12 +6,20 @@