Skip to content

Commit 692f0f8

Browse files
committed
fix: production remove setting menu
1 parent cfc3bbc commit 692f0f8

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

β€Ž.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NODE_ENV=production
2+
VUE_APP_PREVIEW=false

β€Žpackage.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"scripts": {
66
"serve": "vue-cli-service serve",
77
"build": "vue-cli-service build",
8+
"build:preview": "vue-cli-service build --mode preview",
89
"lint": "vue-cli-service lint",
910
"lint:nofix": "vue-cli-service lint --no-fix",
1011
"test:unit": "vue-cli-service test:unit",
@@ -21,16 +22,14 @@
2122
"md5": "^2.2.1",
2223
"moment": "^2.24.0",
2324
"nprogress": "^0.2.0",
24-
"opencollective-postinstall": "^2.0.2",
2525
"viser-vue": "^2.3.3",
2626
"vue": "^2.5.22",
2727
"vue-clipboard2": "^0.2.1",
2828
"vue-cropper": "0.4.4",
2929
"vue-ls": "^3.2.0",
3030
"vue-router": "^3.0.1",
3131
"vue-svg-component-runtime": "^1.0.1",
32-
"vuex": "^3.1.0",
33-
"opencollective": "^1.0.3"
32+
"vuex": "^3.1.0"
3433
},
3534
"devDependencies": {
3635
"@babel/polyfill": "^7.2.5",
@@ -50,7 +49,9 @@
5049
"less": "^3.8.1",
5150
"less-loader": "^4.1.0",
5251
"vue-svg-icon-loader": "^2.1.1",
53-
"vue-template-compiler": "^2.5.22"
52+
"vue-template-compiler": "^2.5.22",
53+
"opencollective": "^1.0.3",
54+
"opencollective-postinstall": "^2.0.2"
5455
},
5556
"eslintConfig": {
5657
"root": true,

β€Žsrc/config/defaultSettings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default {
2323
autoHideHeader: false, // auto hide header
2424
colorWeak: false,
2525
multiTab: false,
26-
production: process.env.NODE_ENV === 'production',
26+
production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true',
2727
// vue-ls options
2828
storageOptions: {
2929
namespace: 'pro__', // key prefix

0 commit comments

Comments
Β (0)