| | |
| | | // transpileDependencies: true |
| | | // }) |
| | | const path = require("path") |
| | | const getServerJson = require("./public/serverconfig") |
| | | const devServer = require("./vue.develop.config") |
| | | const { context } = getServerJson |
| | | // 基础路径 注意发布之前要先修改这里 |
| | | const publicPath = "/" |
| | | function resolve(dir) { |
| | | return path.join(__dirname, dir) |
| | | } |
| | | module.exports = { |
| | | publicPath: context, |
| | | publicPath, |
| | | lintOnSave: false, |
| | | productionSourceMap: false, // 如果你不需要生产环境的source map, 可以将其设置为false 以加速生产环境构建 |
| | | devServer, |
| | | devServer: { |
| | | proxy: { |
| | | "/api/base": { |
| | | target: "http://192.168.20.118:8001", |
| | | ws: true, |
| | | changeOrigin: true |
| | | }, |
| | | "/api/salesLeads": { |
| | | target: "http://192.168.20.118:8001", |
| | | ws: true, |
| | | changeOrigin: true |
| | | }, |
| | | "/api/followRecord": { |
| | | target: "http://192.168.20.118:8001", |
| | | ws: true, |
| | | changeOrigin: true |
| | | }, |
| | | "/api-s": { |
| | | target: "http://192.168.20.119:9081", |
| | | ws: true, |
| | | changeOrigin: true |
| | | }, |
| | | "/api": { |
| | | target: "http://192.168.20.118:8001", |
| | | ws: true, |
| | | changeOrigin: true |
| | | } |
| | | // "/api-s": { |
| | | // target: "http://192.168.20.113:9081", |
| | | // ws: true, |
| | | // changeOrigin: true, |
| | | // }, |
| | | } |
| | | }, |
| | | transpileDependencies: [ |
| | | // 兼容IE11浏览器(兼容npm包和cnpm包) |
| | | "crypto-js", |