diff --git a/.env.huahe b/.env.huahe index fc4b5c3..09ad87b 100644 --- a/.env.huahe +++ b/.env.huahe @@ -2,6 +2,7 @@ # 生产环境配置 NODE_ENV = 'production' +BABEL_ENV = 'production' ENV = 'huahe' # 若依管理系统/生产环境 VUE_APP_BASE_API = '/prod-api' diff --git a/.env.production b/.env.production index 51eb091..efe25fc 100644 --- a/.env.production +++ b/.env.production @@ -2,6 +2,7 @@ # 生产环境配置 ENV = 'production' +BABEL_ENV = 'production' # 若依管理系统/生产环境 VUE_APP_BASE_API = '/prod-api' diff --git a/.env.zhiyu b/.env.zhiyu index defc7e4..f43339f 100644 --- a/.env.zhiyu +++ b/.env.zhiyu @@ -2,6 +2,7 @@ # 生产环境配置 NODE_ENV = 'production' +BABEL_ENV = 'production' ENV = 'zhiyu' # 若依管理系统/生产环境 VUE_APP_BASE_API = '/prod-api' diff --git a/babel.config.js b/babel.config.js index b99f001..b0b0a3e 100644 --- a/babel.config.js +++ b/babel.config.js @@ -8,6 +8,9 @@ module.exports = { // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require(). // This plugin can significantly increase the speed of hot updates, when you have a large number of pages. 'plugins': ['dynamic-import-node'] + }, + 'production': { + 'plugins': ['@babel/plugin-syntax-dynamic-import'] } } }