move option for enable/disable mock/mock-erver to .env.* file

This commit is contained in:
RoBlues
2020-02-03 19:01:09 +08:00
parent 4ff36f1d84
commit 0a4b206c41
5 changed files with 68 additions and 3 deletions

View File

@@ -4,6 +4,18 @@ ENV = 'development'
# base api
VUE_APP_BASE_API = '/dev-api'
# 用VUE_APP_MOCK配置如何使用Mock
# 该值会被用在Vue.config.js和src/main.js中
# 其取值和意义如下:
# None - 表示不使用Mock或Mock-server,不配置意义相同
# Mock - 表示使用mock
# Mock_Server 表示使用Mock_Server。
VUE_APP_MOCK = Mock
# Mock_Server Context 表示在使用Mock-Server时它的应用context。
# 该值会被用在vue.config.js和/mock/mock-server.js中
VUE_APP_MOCK_SERVER_CONTEXT = /mock
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
# It only does one thing by converting all import() to require().
@@ -12,3 +24,4 @@ VUE_APP_BASE_API = '/dev-api'
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
VUE_CLI_BABEL_TRANSPILE_MODULES = true