revert: 先回退前端分开构建

This commit is contained in:
Captain.B 2021-07-02 14:22:11 +08:00 committed by 刘瑞斌
parent d81cb28bfb
commit ac73d686b6
2 changed files with 19 additions and 53 deletions

View File

@ -55,30 +55,12 @@
</execution>
<!-- Build and minify static files -->
<execution>
<id>yarn build business</id>
<id>yarn build</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>build business</arguments>
</configuration>
</execution>
<execution>
<id>yarn build login</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>build login</arguments>
</configuration>
</execution>
<execution>
<id>yarn build document</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>build document</arguments>
<arguments>build</arguments>
</configuration>
</execution>
</executions>

View File

@ -4,38 +4,6 @@ function resolve(dir) {
return path.join(__dirname, dir);
}
let projectName = process.argv[3];
const projects = {
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"
}
};
const getPage = function (projectName) {
if (!projectName) {
return projects;
}
return {
[projectName]: projects[projectName]
};
};
let pages = getPage(projectName);
module.exports = {
productionSourceMap: false,
devServer: {
@ -49,7 +17,23 @@ module.exports = {
},
}
},
pages: pages,
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"
}
},
configureWebpack: {
devtool: 'source-map',
resolve: {