-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvue.config.js
More file actions
42 lines (39 loc) · 838 Bytes
/
Copy pathvue.config.js
File metadata and controls
42 lines (39 loc) · 838 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
31
32
33
34
35
36
37
38
39
40
41
42
const path = require('path')
const { name } = require('./package')
function resolve(dir) {
return path.join(__dirname, dir)
}
const port = 8081
module.exports = {
publicPath: process.env.NODE_ENV === 'development' ? '/' : '/visual',
outputDir: 'dist',
assetsDir: 'static',
filenameHashing: true,
devServer: {
// host: '0.0.0.0',
hot: true,
disableHostCheck: true,
port,
overlay: {
warnings: false,
errors: true,
},
headers: {
'Access-Control-Allow-Origin': '*',
},
},
// 自定义webpack配置
configureWebpack: {
resolve: {
alias: {
'@': resolve('src'),
},
},
output: {
// 把子应用打包成 umd 库格式
library: `${name}-[name]`,
libraryTarget: 'umd',
jsonpFunction: `webpackJsonp_${name}`,
},
},
}