新建 .env.development和 .env.production
2. .env.development文件内容
# just a flag
ENV = 'development' //开发模式
# base api
VUE_APP_BASE_API = '/dev-api' //------------->可以通过process.evn.xxx访问
# 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().
# This configuration can significantly increase the speed of hot updates,
# when you have a large number of pages.
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
VUE_CLI_BABEL_TRANSPILE_MODULES = true
.env.production文件内容