diff --git a/ah-jjzhgd-web/package.json b/ah-jjzhgd-web/package.json index 977eb5f..474b120 100644 --- a/ah-jjzhgd-web/package.json +++ b/ah-jjzhgd-web/package.json @@ -5,8 +5,9 @@ "author": "Pan ", "scripts": { "dev": "vue-cli-service serve", + "prod": "vue-cli-service serve --mode production", "lint": "eslint --ext .js,.vue src", - "build:prod": "vue-cli-service build", + "build:prod": "vue-cli-service build --mode production", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", "new": "plop", diff --git a/ah-jjzhgd-web/vue.config.js b/ah-jjzhgd-web/vue.config.js index 45322ff..04634dd 100644 --- a/ah-jjzhgd-web/vue.config.js +++ b/ah-jjzhgd-web/vue.config.js @@ -24,7 +24,7 @@ module.exports = { * In most cases please use '/' !!! * Detail: https://cli.vuejs.org/config/#publicpath */ - publicPath: '/', + publicPath: process.env.ENV === 'production' ? '/zhgd-web/' : '/', outputDir: 'dist', assetsDir: 'static', lintOnSave: false, @@ -35,8 +35,10 @@ module.exports = { open: true, proxy: { [process.env.VUE_APP_BASE_API]: { - target: `http://10.40.92.106:18080/zhgd`, - // target: `http://10.40.92.42:18080/zhgd`, + // target: `http://10.40.92.33:18080/zhgd`, + target: `http://192.168.0.7:18080/zhgd`, + // target: `http://10.40.92.44:18080/zhgd`, + // target: `http://10.40.92.106:18080/zhgd`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '' @@ -97,6 +99,12 @@ module.exports = { }) .end() + // config.module + // .rule('css') + // .test(/\.css$/) + // .use('css-loader') + // .loader('css-loader') + config .when(process.env.NODE_ENV !== 'development', config => {