diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..e1b9ffa --- /dev/null +++ b/.env.development @@ -0,0 +1,11 @@ +# 页面标题 +VUE_APP_TITLE = 睿展-代码生成系统 + +# 开发环境配置 +ENV = 'development' + +# 睿展-代码生成系统/开发环境 +VUE_APP_CONTEXT_PATH='/variant-front' + +# 路由懒加载 +VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..9c2470a --- /dev/null +++ b/.env.production @@ -0,0 +1,17 @@ +### + # @version: V1.0.0 + # @Date: 2023-03-20 14:50:32 + # @LastEditors: lzq + # @LastEditTime: 2023-03-20 14:51:47 + # @company: 睿展数据 + # @FilePath: \variant-form\.env.production + # @Descripttion: +### +# 页面标题 +VUE_APP_TITLE = 睿展-代码生成系统 + +# 生产环境配置 +ENV = 'production' + +# 睿展-代码生成系统/生产环境 +VUE_APP_CONTEXT_PATH='/variant-front' diff --git a/.env.staging b/.env.staging new file mode 100644 index 0000000..554656e --- /dev/null +++ b/.env.staging @@ -0,0 +1,19 @@ +### + # @version: V1.0.0 + # @Date: 2023-03-20 14:50:34 + # @LastEditors: lzq + # @LastEditTime: 2023-03-20 14:52:42 + # @company: 睿展数据 + # @FilePath: \variant-form\.env.staging + # @Descripttion: +### +# 页面标题 +VUE_APP_TITLE = 睿展-代码生成系统 + +NODE_ENV = production + +# 测试环境配置 +ENV = 'staging' + +# 睿展-代码生成系统/测试环境 +VUE_APP_CONTEXT_PATH='/variant-front' diff --git a/package.json b/package.json index 6742540..92d6948 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": false, "scripts": { "serve": "vue-cli-service serve --open src/main.js", - "build": "vue-cli-service build --report --dest dist/build", + "build:prod": "vue-cli-service build", "lib": "vue-cli-service build --report --target lib --dest dist/lib --name VFormDesigner install.js", "lib-render": "vue-cli-service build --report --target lib --dest dist/lib-render --name VFormRender install-render.js", "lint": "vue-cli-service lint" diff --git a/vue.config.js b/vue.config.js index cfc097c..4a0dd0b 100644 --- a/vue.config.js +++ b/vue.config.js @@ -40,9 +40,9 @@ if (IS_PROD && buildProdFlag) { module.exports = { - publicPath: '/variant-form', + publicPath: process.env.VUE_APP_CONTEXT_PATH, assetsDir: './', - + outputDir: "dist", /* 开启vue运行时模板编译功能!! */ runtimeCompiler: true,