-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
50 lines (42 loc) · 1.11 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
44
45
46
47
48
49
50
// const { VantResolver } = require('unplugin-vue-components/resolvers');
const ComponentsPlugin = require('unplugin-vue-components/webpack');
const path = require('path')
const port = 81 // 端口配置
function resolve(dir) {
return path.join(__dirname, dir)
}
const webpack = require("webpack");
module.exports = {
publicPath:'./',
lintOnSave : false,
configureWebpack: {
// plugins: [
// ComponentsPlugin({
// resolvers: [VantResolver()],
// }),
// ],
//支持jquery
plugins: [
new webpack.ProvidePlugin({
$:"jquery",
jQuery:"jquery",
"windows.jQuery":"jquery"
})
]
},
devServer: {
host: '0.0.0.0',
port: port,
open: false,
proxy: {
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.0.38/dev-api/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
}
},
disableHostCheck: true
},
}