docs.js
1.71 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
/*
* @Date: 2021-08-18 12:47:05
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-11-21 15:29:14
* @FilePath: /vue-flow-editor/build/docs.js
* @Description: 文件描述
*/
const $utils = require('./build.utils')
module.exports = {
publicPath: './',
outputDir: 'docs',
pages: {
index: {
entry: $utils.resolve('doc/main.ts'),
template: 'public/index.html',
filename: 'index.html',
title: 'vue-flow-editor',
chunks: ['chunk-vendors', 'chunk-common', 'index'],
},
},
configureWebpack:{
module: {
rules: [
{
test: /\.mjs$/,
include: /node_modules/,
type: "javascript/auto"
},
]
}
},
devServer: {
open: true,
// open: process.platform === 'darwin',
host: '0.0.0.0',
port: 4418,
https: false,
hotOnly: false,
compress: true,
// 设置代理
proxy: {
'/admin/': {
// filter: ['/op/', '/fi/', '/de/', '/st/', '/fr/', '/pr/', '/pu/', '/dl/', '/b/', '/t/', '/rpt/', '/mm/', '/mp/'],
target: 'https://oa-dev.onwall.cn',
changeOrigin: true,
// pathRewrite: {
// '^/api': ''
// },
onProxyReq: function (proxyReq, req, res, options) {
proxyReq.setHeader('X-Proxy-Host', req.header('host'));
proxyReq.setHeader('X-Proxy-Request-URI', req.url);
}
}
},
before: app => {},
overlay: {
warnings: false,
errors: true
}
},
}