-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvue.config.js
More file actions
30 lines (29 loc) · 872 Bytes
/
Copy pathvue.config.js
File metadata and controls
30 lines (29 loc) · 872 Bytes
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
const { defineConfig } = require('@vue/cli-service')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
module.exports = defineConfig({
//node-polyfill-webpack-plugin
configureWebpack: {
plugins: [new NodePolyfillPlugin()],
},
transpileDependencies: [
'vuetify'
],
//配置代理
devServer: {
// 外部浏览器可访问
// disableHostCheck: true,
// historyApiFallback: true,
allowedHosts: "all",
proxy: {
"/api": {
target: "http://localhost:8888",
changeOrigin: true,
pathRewrite: {"^/api": ""}
}
}
},
css: {
extract: false, // 是否使用css分离插件 ExtractTextPlugin 开启extract后,组件样式以内部样式表的形式加载的, 打包的结果会多出一个 css 文件夹以及css 文件。
sourceMap: true, // 开启 CSS source maps?
}
})