1234567891011121314151617181920212223242526272829303132 |
- module.exports = {
- outputDir: "shenze",
- publicPath: "/shenze",
- // publicPath: '/sunzee-stock',
- assetsDir: "static",
- css: {
- extract: false,
- },
- filenameHashing: true,
- configureWebpack: {
- output: {
- filename: "[name].[hash].js",
- chunkFilename: "[id].[hash].chunk.js",
- },
- },
- devServer: {
- open: true,
- proxy: {
- "/": {
- // target: 'http://120.25.151.99:49022', // 代理地址,这里设置的地址会代替axios中设置的baseURL
- target: "http://120.25.151.99:49011",
- // target: 'http://112.74.63.148:49011',
- // secure: true, // 使用的是http协议设置为 false,https协议设置为 true
- changeOrigin: true, // 是否跨域
- pathRewrite: {
- // '.+?/api': '/api' // 对反向代理的地址进行重写,因为正确的接口路径是没有/api的,所以需要用'^/api': '/',表示请求接口时去掉api
- },
- },
- },
- disableHostCheck: true,
- },
- };
|