From 1e7216feef02857bf19ecfa9dd08f29dae0f1c61 Mon Sep 17 00:00:00 2001 From: niushuai233 Date: Fri, 30 Dec 2022 09:50:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=85=8D=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- .env.development | 6 +++--- .env.production | 6 +++--- .env.test | 8 ++++---- package.json | 2 +- vue.config.js | 34 ++++++++++++++++------------------ 6 files changed, 28 insertions(+), 30 deletions(-) diff --git a/.env b/.env index 85b6e0f..3dc1632 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ NODE_ENV=development -VUE_APP_PLATFORM_NAME=JeecgBoot 企业级低代码平台 +VUE_APP_PLATFORM_NAME=DB Bastion Server # 开启单点登录 VUE_APP_SSO=false # 开启微应用模式 diff --git a/.env.development b/.env.development index 5afd338..bd083ae 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ NODE_ENV=development -VUE_APP_API_BASE_URL=http://localhost:8080/ -VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas -VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview +VUE_APP_API_BASE_URL=http://localhost:8080/devApi +VUE_APP_CAS_BASE_URL=http:///cas +VUE_APP_ONLINE_BASE_URL=http:///onlinePreview # 微应用列表必须VUE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径 VUE_APP_SUB_jeecg-app-1 = '//localhost:8092' diff --git a/.env.production b/.env.production index 530cebc..1c0cad8 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ NODE_ENV=production -VUE_APP_API_BASE_URL=http://localhost:8080/jeecg-boot -VUE_APP_CAS_BASE_URL=http://localhost:8888/cas -VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview \ No newline at end of file +VUE_APP_API_BASE_URL=http://localhost:8080/prodApi +VUE_APP_CAS_BASE_URL=http:///cas +VUE_APP_ONLINE_BASE_URL=http:///onlinePreview \ No newline at end of file diff --git a/.env.test b/.env.test index 9cda05a..cfa7220 100644 --- a/.env.test +++ b/.env.test @@ -1,4 +1,4 @@ -NODE_ENV=production -VUE_APP_API_BASE_URL=http://boot.jeecg.com:8080/jeecg-boot -VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas -VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview \ No newline at end of file +NODE_ENV=test +VUE_APP_API_BASE_URL=http://localhost:8080/testApi +VUE_APP_CAS_BASE_URL=http:///cas +VUE_APP_ONLINE_BASE_URL=http:///onlinePreview \ No newline at end of file diff --git a/package.json b/package.json index c26cda4..2fd16dc 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "vue-antd-jeecg", + "name": "db-bastion-vue-antd", "version": "3.4.3", "private": true, "scripts": { diff --git a/vue.config.js b/vue.config.js index dd1ecae..c9a2a64 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,5 @@ const path = require('path') -const CompressionPlugin = require("compression-webpack-plugin") +const CompressionPlugin = require('compression-webpack-plugin') function resolve(dir) { return path.join(__dirname, dir) @@ -14,8 +14,8 @@ module.exports = { */ // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 productionSourceMap: false, - //qiankuan打包时放开 - //outputDir: "../dist/main", + // qiankuan打包时放开 + // outputDir: "../dist/main", // 多入口配置 // pages: { // index: { @@ -24,10 +24,10 @@ module.exports = { // filename: 'index.html', // } // }, - //打包app时放开该配置 - //publicPath:'/', + // 打包app时放开该配置 + // publicPath:'/', configureWebpack: config => { - //生产环境取消 console.log + // 生产环境取消 console.log if (process.env.NODE_ENV === 'production') { config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true } @@ -40,7 +40,7 @@ module.exports = { .set('@comp', resolve('src/components')) .set('@views', resolve('src/views')) - //生产环境,开启js\css压缩 + // 生产环境,开启js\css压缩 if (process.env.NODE_ENV === 'production') { config.plugin('compressionPlugin').use(new CompressionPlugin({ test: /\.(js|css|less)$/, // 匹配文件名 @@ -68,9 +68,7 @@ module.exports = { .use() .loader('babel-loader') .end() - }, - css: { loaderOptions: { less: { @@ -78,9 +76,9 @@ module.exports = { /* less 变量覆盖,用于自定义 ant design 主题 */ 'primary-color': '#1890FF', 'link-color': '#1890FF', - 'border-radius-base': '4px', + 'border-radius-base': '4px' }, - javascriptEnabled: true, + javascriptEnabled: true } } }, @@ -102,18 +100,18 @@ module.exports = { ws: false, changeOrigin: true, pathRewrite: { - '/jeecg-boot': '' //默认所有请求都加了jeecg-boot前缀,需要去掉 + '/xxx': '' //默认所有请求都加了xxx前缀,需要去掉 } - },*/ - /* 注意:jeecgboot前端做了改造,此处不需要配置跨域和后台接口(只需要改.env相关配置文件即可) - issues/3462 很多人此处做了配置,导致刷新前端404问题,请一定注意*/ - '/jeecg-boot': { + }, */ + /* 注意:xxx前端做了改造,此处不需要配置跨域和后台接口(只需要改.env相关配置文件即可) + issues/3462 很多人此处做了配置,导致刷新前端404问题,请一定注意 */ + '/xxx': { target: 'http://localhost:8080', ws: false, changeOrigin: true - }, + } } }, lintOnSave: undefined -} \ No newline at end of file +}