diff --git a/frontend/pom.xml b/frontend/pom.xml
index fba5959e96..c6785b7436 100644
--- a/frontend/pom.xml
+++ b/frontend/pom.xml
@@ -55,12 +55,30 @@
- yarn build
+ yarn build business
yarn
- build
+ build business
+
+
+
+ yarn build login
+
+ yarn
+
+
+ build login
+
+
+
+ yarn build document
+
+ yarn
+
+
+ build document
diff --git a/frontend/src/login/login.js b/frontend/src/login/login.js
index 33a93e7ed7..10d516cb2f 100644
--- a/frontend/src/login/login.js
+++ b/frontend/src/login/login.js
@@ -1,5 +1,5 @@
import Vue from 'vue';
-import {Button, Col, Form, FormItem, Input, Row, RadioGroup} from 'element-ui';
+import {Button, Col, Form, FormItem, Input, Row, RadioGroup, Radio} from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import Login from "./Login.vue";
import Ajax from "../common/js/ajax";
@@ -18,6 +18,7 @@ Vue.use(FormItem);
Vue.use(Input);
Vue.use(Button);
Vue.use(RadioGroup);
+Vue.use(Radio);
Vue.use(Ajax);
diff --git a/frontend/vue.config.js b/frontend/vue.config.js
index 455ea04148..361a4caee8 100644
--- a/frontend/vue.config.js
+++ b/frontend/vue.config.js
@@ -1,9 +1,41 @@
-const path = require('path')
+const path = require('path');
function resolve(dir) {
- return path.join(__dirname, 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: {
@@ -17,23 +49,7 @@ module.exports = {
},
}
},
- 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"
- }
- },
+ pages: pages,
configureWebpack: {
devtool: 'source-map',
resolve: {
@@ -43,6 +59,6 @@ module.exports = {
}
},
chainWebpack(config) {
- config.plugins.delete('prefetch')
+ config.plugins.delete('prefetch');
}
};