-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
46 lines (44 loc) · 937 Bytes
/
vite.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
44
45
46
import {
createVuePlugin
} from 'vite-plugin-vue2'
import path from "path"
const defaultSettings = require('./src/settings.js')
const name = defaultSettings.title || 'vue Admin Template' // page title
export default {
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
"@": path.resolve(__dirname, "src")
},
},
css: {
postcss: {
plugins: [{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: (atRule) => {
if (atRule.name === 'charset') {
atRule.remove();
}
}
}
}],
},
},
assetsDir: './',
open: false,
https: false,
server: {
port: 8006, // 本地服务端口
proxy: {
'/admin': {
target: 'http://192.168.101.194:3001',
changeOrigin: true,
pathRewrite: {
'^/admin': ''
}
}
}
},
plugins: [createVuePlugin()],
}