| | |
| | | |
| | | const CompressionPlugin = require('compression-webpack-plugin') |
| | | |
| | | const name = process.env.VUE_APP_TITLE || '张氏APP' // 网页标题 |
| | | const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题 |
| | | |
| | | const port = process.env.port || process.env.npm_config_port || 8088 // 端口 |
| | | const port = process.env.port || process.env.npm_config_port || 80 // 端口 |
| | | |
| | | // vue.config.js 配置说明 |
| | | //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions |
| | |
| | | port: port, |
| | | open: true, |
| | | proxy: { |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | // detail: https://cli.vuewww.bendudu.comjs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | // target: `http://localhost:8080`, |
| | | target: `http://47.93.189.255:8080`, |
| | | target: `https://10.39.18.174:8080/`, |
| | | // target: 'https://www.bendudu.com:8080/', |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | ['^' + process.env.VUE_APP_BASE_API]: '' |
| | | } |
| | | } |
| | | }, |
| | | https: true, |
| | | disableHostCheck: true |
| | | }, |
| | | css: { |
| | | loaderOptions: { |
| | | // sass: { |
| | | // sassOptions: { outputStyle: "expanded" } |
| | | // } |
| | | postcss:{ |
| | | plugins:[ |
| | | require('postcss-px2rem')({ |
| | | remUnit:192 |
| | | }) |
| | | ] |
| | | sass: { |
| | | sassOptions: { outputStyle: "expanded" }, |
| | | |
| | | } |
| | | } |
| | | }, |
| | |
| | | symbolId: 'icon-[name]' |
| | | }) |
| | | .end() |
| | | // |
| | | // config.module |
| | | // .rule("css") |
| | | // .test(/\.css$/) |
| | | // .oneOf("vue") |
| | | // .resourceQuery(/\?vue/) |
| | | // .use("px2rem") |
| | | // .loader("px2rem-loader") |
| | | // .options({ |
| | | // remUnit: 192 // 设计稿大小比例 / 10 |
| | | // }); |
| | | |
| | | config |
| | | .when(process.env.NODE_ENV !== 'development', |
| | |
| | | } |
| | | ) |
| | | } |
| | | |
| | | } |