Skip to content

Commit 13db293

Browse files
author
John Doe
committed
refactor: update targets 2
1 parent cb89de4 commit 13db293

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/create-cli/tsdown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig({
77
tsconfig: `packages/${projectName}/tsconfig.lib.json`,
88
outDir: `packages/${projectName}/dist/src`, // Output to src/ subdirectory to match tsc
99
unbundle: true, // Preserve directory structure like tsc
10-
format: ['esm', 'cjs'], // dual build
10+
format: ['esm'], // ESM only (uses top-level await)
1111
fixedExtension: true, // emit .mjs for esm and .cjs for cjs
1212
dts: true,
1313
hash: false,

packages/models/tsdown.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export default defineConfig({
1414
external: ['zod', 'vscode-material-icons'],
1515
exports: false, // manually manage exports via onSuccess
1616
copy: [
17+
{
18+
from: `packages/${projectName}/package.json`,
19+
to: `packages/${projectName}/dist/package.json`,
20+
},
1721
{
1822
from: `packages/${projectName}/README.md`,
1923
to: `packages/${projectName}/dist/README.md`,

0 commit comments

Comments
 (0)