2020-10-24 07:34:43 +00:00
|
|
|
import { readdirSync } from 'fs';
|
|
|
|
import { join } from 'path';
|
|
|
|
|
|
|
|
// utils must build before core
|
|
|
|
// runtime must build before renderer-react
|
|
|
|
const headPkgs = [
|
|
|
|
'database',
|
|
|
|
'resourcer',
|
|
|
|
'actions',
|
2020-11-11 07:23:39 +00:00
|
|
|
'client',
|
2020-12-05 01:27:24 +00:00
|
|
|
'server'
|
2020-10-24 07:34:43 +00:00
|
|
|
];
|
|
|
|
const tailPkgs = [];
|
|
|
|
const otherPkgs = readdirSync(join(__dirname, 'packages')).filter(
|
|
|
|
(pkg) => {
|
2020-11-11 07:23:39 +00:00
|
|
|
return !['father-build', 'app'].includes(pkg) && pkg.charAt(0) !== '.' && !headPkgs.includes(pkg) && !tailPkgs.includes(pkg)
|
2020-10-24 07:34:43 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
|
|
|
|
export default {
|
|
|
|
target: 'node',
|
|
|
|
cjs: { type: 'babel', lazy: true },
|
|
|
|
// disableTypeCheck: true,
|
|
|
|
pkgs: [...headPkgs, ...otherPkgs, ...tailPkgs],
|
|
|
|
};
|