-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.config.ts
41 lines (36 loc) · 942 Bytes
/
build.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import { defineBuildConfig } from 'unbuild';
const ROOT_DIR = dirname(fileURLToPath(import.meta.url));
// const entries: BuildEntry[] = [
// //
// 'index',
// // 'configs/index',
// // 'configs/php',
// // 'utils/helpers',
// ].map((entry) => {
// return { input: `./src/${entry}`, builder: 'rollup' };
// });
// console.log(entries);
export default defineBuildConfig([
//! Package
{
// name: 'Distribution',
// entries, // Let it autodetect entries from package.json
rollup: {
dts: {
tsconfig: resolve(ROOT_DIR, './tsconfig.base.json'),
},
inlineDependencies: true,
output: {
preserveModules: true,
inlineDynamicImports: false,
// manualChunks: {},
},
},
declaration: 'compatible',
alias: {
'~': resolve(ROOT_DIR, './src'),
},
},
]);