Skip to content

Commit b026146

Browse files
committed
build(config): add node-specific build outputs for ESM and CJS
- Add node-specific build configurations for both ESM and CJS formats - Update package.json to include node-specific entry points - Maintain existing main entry points for the package
1 parent e626612 commit b026146

4 files changed

Lines changed: 658 additions & 920 deletions

File tree

build.config.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@ export default defineBuildConfig({
66
'./src/index',
77
{
88
builder: 'mkdist',
9-
input: './src/',
10-
outDir: './dist',
9+
input: './src/node',
10+
outDir: './dist/node',
11+
format: 'esm',
12+
},
13+
{
14+
builder: 'mkdist',
15+
input: './src/node',
16+
outDir: './dist/node',
17+
format: 'cjs',
18+
ext: 'cjs',
1119
},
1220
],
1321
declaration: true,

0 commit comments

Comments
 (0)