-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
43 lines (43 loc) · 1.07 KB
/
vue.config.js
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
const { defineConfig } = require("@vue/cli-service");
const AutoImport = require("unplugin-auto-import/webpack");
const Components = require("unplugin-vue-components/webpack");
const { ElementPlusResolver } = require("unplugin-vue-components/resolvers");
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
devServer: {
proxy: {
"/api": {
target: "http://localhost:8000",
ws: true,
changeOrigin: true,
},
"/static": {
target: "http://localhost:8000",
ws: true,
changeOrigin: true,
},
"/full_pdb": {
target: "http://localhost:8000/static",
ws: true,
changeOrigin: true,
},
},
},
configureWebpack: {
resolve: {
fallback: {
fs: false, // 如果不需要fs模块,将其置为false
path: require.resolve("path-browserify"),
},
},
plugins: [
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
],
},
});