gx
queenwuli
2022-03-22 604bb05b905ce05b8ec70c743444d1251ff6fe1b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const { defineConfig } = require('@vue/cli-service')
const webpack = require('webpack');
 
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack:{
    resolve: {
      alias: {
        querystring:false,
        url:false,
        os:false,
        crypto: false,
        stream: false,
        assert: false,
        http: false,
        https: false
        }
    },
    plugins: [
      new webpack.ProvidePlugin({
        process: "process/browser",
        Buffer: ["buffer", "Buffer"],
      }),
    ]
  },
  devServer: {
    proxy: { 
      '/api': {
        target: 'http://120.27.238.55:8802',  
        changOrigin: true, 
        pathRewrite: {
          '^/api': '' 
        }
      },
    }
  },
  publicPath: './'
})