Skip to content

Commit b962100

Browse files
committed
build: add resolveEntries template
1 parent 6a686e5 commit b962100

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tsup.config.mts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ import path from 'node:path';
33

44
import { defineConfig } from 'tsup';
55

6+
// async function resolveEntries(targetDir: string) {
7+
// const baseDir = path.join('src', targetDir);
8+
// const entries: { [key: string]: string } = {
9+
// [targetDir]: path.join(baseDir, 'index.ts')
10+
// };
11+
// for (const dirname of await fs.readdir(baseDir, 'utf-8')) {
12+
// const dirpath = path.join(baseDir, dirname);
13+
// if (!(await fs.lstat(dirpath)).isDirectory()) {
14+
// continue;
15+
// }
16+
// entries[`${targetDir}/${dirname}`] = path.join(dirpath, 'index.ts');
17+
// }
18+
// return entries;
19+
// }
20+
621
export default defineConfig([
722
{
823
banner: {

0 commit comments

Comments
 (0)