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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
| const path = require("path");
| const resolve = (dir) => path.join(__dirname, dir);
| module.exports = {
| lintOnSave: false,
| publicPath: "./",
| devServer: {
| host: "0.0.0.0", //指定要使用的 host
| port: 12315, //指定端口号以侦听
| hotOnly: false, //启用热模块替换,而无需页面刷新作为构建失败时的回退。
| open: true,
| proxy: {
| "/dev-api": {
| target: 'http://103.135.160.14:7800',
| // target: 'http://103.135.160.14:7777',
| changeOrigin: true,
| pathRewrite: {
| '^/dev-api': ''
| }
| },
| "/data-api": {
| target: 'http://103.135.160.14:9038/',
| changeOrigin: true,
| pathRewrite: {
| '^/data-api': ''
| }
| },
| "/rag-api": {
| target: 'http://103.135.160.14:6367/',
| changeOrigin: true,
| pathRewrite: {
| '^/rag-api': ''
| }
| },
| },
| },
|
|
| configureWebpack: {
| module: {
| rules: [
| {
| test: /\.scss$/,
| loaders: ["style", "css", "sass"]
| }
| ]
| },
| resolve: {
| alias: {
| "@": resolve("src")
| }
| },
| performance: {
| hints: "warning",
| // 入口起点的最大体积
| maxEntrypointSize: 90000000,
| // 生成文件的最大体积
| maxAssetSize: 90000000,
| // 只给出 js 文件的性能提示
| assetFilter: function (assetFilename) {
| return assetFilename.endsWith(".js") || assetFilename.endsWith(".css");
| }
| },
| devtool:"source map"
| }
| };
|
|