Create multiple distribution with Vue-cli 3

Hi guys.
I have problem relating to latest vue-cli v3.x which is encouraged to use zero config.
This is what we have in our project (using vue-cli prior ver 3):
We have about 700 vue pages, separated into 5 modules, since building time need
so much time, we add 5 router for each module beside main router, so each module have
2 routers (main router and module router).
Inside main router is login page and home page only.
Our target is to make 5 distribution folder for each module to cut building time,
so we copy existing config and build folder into another 5 folder for each module,
and create new entries inside package.json for each module,
more or less is like these:

root folder:
	build:
		module1:
			build.js
			webpack.base.conf.js
			...
		module2:
			build.js
			webpack.base.conf.js
			...
		...
	config:
		module1:
			index.js
			dev.env.js
			prod.env.js
		module2:
			index.js
			dev.env.js
			prod.env.js
		...
	dist:
		module1:
			static:
		module2:
			static:
	src:
		router:
			index.js
			router-main.js
			router-module1.js
			router-module2.js
			...

and inside package.json, we add these entries:

{
	"dev-module1": "webpack-dev-server --inline ...",
	"build-module1: "node build/module1/build.js",
	"dev-module2": "webpack-dev-server --inline ...",
	"build-module2: "node build/module2/build.js",
	...
}

plus we have to figure it out how to adjust config and build script
to make sure match with relating module. And it is work flawlessly.
We learn from existing configuration files, guessing and make trial and error
until we succeed to create 5 distribution for all modules, also we succeed to
add another plugin for create timestamp.json to record last build time.
The question is how to create configuration files in vue-cli v3.x since there
are no existing configuration files to learnt?
I feel walking in the dark. Please help… Thank you

Okay, after try those and these, I decided to use below solution
to accomodate my 700 pages of vue into 5 modules with
vue-cli v3.x. Not fancy maybe but for me is enough.

1. Adding .env on the root, like these:

.env.module1:
	VUE_APP_MODULE=module1
.env.module2:
	VUE_APP_MODULE=module2
...

.env.module1.production:
	NODE_ENV=production
	VUE_APP_MODULE=module1
.env.module2.production:
	NODE_ENV=production
	VUE_APP_MODULE=module1
...

2. Add entries in package.json, like these:

package.json:
  "scripts": {
    "serve module1": "vue-cli-service serve --mode module1 --port 8100",
    "serve module2": "vue-cli-service serve --mode module2 --port 8101",
    ...,
    "build module1": "vue-cli-service build --mode module1.production --dest dist/module1",
    "build module2": "vue-cli-service build --mode module2.production --dest dist/module2",
    ...
  }

3. Modify router.js like these:

...
let theRoute = [
  { path: '/', name: 'home', component: Home },
  { path: '/about', name: 'about', 
    component: () => import(/* webpackChunkName: "about" */ './views/About.vue') }
]

if (process.env.VUE_APP_MODULE === 'module1') {
  theRoute.push({ path: '/hello', name: 'hello', 
  component: () => import(/* webpackChunkName: "hello" */ './views/Hello.vue') })
}

if (process.env.VUE_APP_MODULE === 'module2') {
  theRoute.push({ path: '/juga', name: 'juga', 
  component: () => import(/* webpackChunkName: "juga" */ './views/Juga.vue') })
}

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: theRoute,
})

That’s it. Now I have to deal with plugins.