2021-07-02 14:01:53 +08:00
|
|
|
const path = require('path');
|
2020-09-27 12:46:32 +08:00
|
|
|
|
|
|
|
function resolve(dir) {
|
2021-07-02 14:01:53 +08:00
|
|
|
return path.join(__dirname, dir);
|
2020-09-27 12:46:32 +08:00
|
|
|
}
|
|
|
|
|
2020-02-03 14:01:28 +08:00
|
|
|
module.exports = {
|
2021-06-11 16:19:04 +08:00
|
|
|
productionSourceMap: false,
|
2020-07-09 17:04:34 +08:00
|
|
|
devServer: {
|
|
|
|
port: 8080,
|
|
|
|
proxy: {
|
2021-02-25 13:46:01 +08:00
|
|
|
//1.8需求:增加分享功能,不登陆即可看到文档页面。所以代理设置增加了(?!/document)文档页面的相关信息
|
2021-03-02 18:22:22 +08:00
|
|
|
// ['^(?!/login)']: {
|
2021-02-25 13:46:01 +08:00
|
|
|
['^((?!/login)(?!/document))']: {
|
2020-07-09 17:04:34 +08:00
|
|
|
target: 'http://localhost:8081',
|
|
|
|
ws: true,
|
2021-02-25 13:46:01 +08:00
|
|
|
},
|
2020-07-09 17:04:34 +08:00
|
|
|
}
|
|
|
|
},
|
2021-07-02 14:22:11 +08:00
|
|
|
pages: {
|
|
|
|
business: {
|
|
|
|
entry: "src/business/main.js",
|
|
|
|
template: "src/business/index.html",
|
|
|
|
filename: "index.html"
|
|
|
|
},
|
|
|
|
login: {
|
|
|
|
entry: "src/login/login.js",
|
|
|
|
template: "src/login/login.html",
|
|
|
|
filename: "login.html"
|
|
|
|
},
|
|
|
|
document: {
|
|
|
|
entry: "src/document/document.js",
|
|
|
|
template: "src/document/document.html",
|
|
|
|
filename: "document.html"
|
|
|
|
}
|
|
|
|
},
|
2020-09-27 12:46:32 +08:00
|
|
|
configureWebpack: {
|
|
|
|
devtool: 'source-map',
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': resolve('src')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
chainWebpack(config) {
|
2021-07-02 14:01:53 +08:00
|
|
|
config.plugins.delete('prefetch');
|
2020-07-09 17:04:34 +08:00
|
|
|
}
|
2020-02-03 15:16:37 +08:00
|
|
|
};
|