Przeglądaj źródła

fix: production remove setting menu

Sendya 6 lat temu
rodzic
commit
692f0f874f
3 zmienionych plików z 8 dodań i 5 usunięć
  1. 2 0
      .env
  2. 5 4
      package.json
  3. 1 1
      src/config/defaultSettings.js

+ 2 - 0
.env

@@ -0,0 +1,2 @@
+NODE_ENV=production
+VUE_APP_PREVIEW=false

+ 5 - 4
package.json

@@ -5,6 +5,7 @@
   "scripts": {
     "serve": "vue-cli-service serve",
     "build": "vue-cli-service build",
+    "build:preview": "vue-cli-service build --mode preview",
     "lint": "vue-cli-service lint",
     "lint:nofix": "vue-cli-service lint --no-fix",
     "test:unit": "vue-cli-service test:unit",
@@ -21,7 +22,6 @@
     "md5": "^2.2.1",
     "moment": "^2.24.0",
     "nprogress": "^0.2.0",
-    "opencollective-postinstall": "^2.0.2",
     "viser-vue": "^2.3.3",
     "vue": "^2.5.22",
     "vue-clipboard2": "^0.2.1",
@@ -29,8 +29,7 @@
     "vue-ls": "^3.2.0",
     "vue-router": "^3.0.1",
     "vue-svg-component-runtime": "^1.0.1",
-    "vuex": "^3.1.0",
-    "opencollective": "^1.0.3"
+    "vuex": "^3.1.0"
   },
   "devDependencies": {
     "@babel/polyfill": "^7.2.5",
@@ -50,7 +49,9 @@
     "less": "^3.8.1",
     "less-loader": "^4.1.0",
     "vue-svg-icon-loader": "^2.1.1",
-    "vue-template-compiler": "^2.5.22"
+    "vue-template-compiler": "^2.5.22",
+    "opencollective": "^1.0.3",
+    "opencollective-postinstall": "^2.0.2"
   },
   "eslintConfig": {
     "root": true,

+ 1 - 1
src/config/defaultSettings.js

@@ -23,7 +23,7 @@ export default {
   autoHideHeader: false, //  auto hide header
   colorWeak: false,
   multiTab: false,
-  production: process.env.NODE_ENV === 'production',
+  production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true',
   // vue-ls options
   storageOptions: {
     namespace: 'pro__', // key prefix