Skip to content

Commit 1dabb2c

Browse files
committed
Add comment explaining use of tsc.
1 parent 285ce48 commit 1dabb2c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tsconfig.release.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
// This config is used by `tsc` to generate .d.ts files only.
3+
// tsdown handles CJS/ESM transpilation but has dts generation issues,
4+
// so we use tsc for type declarations. See tsdown.config.mts for details.
25
"compilerOptions": {
36
"declaration": true,
47
"emitDeclarationOnly": true,

tsdown.config.mts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ const rewriteProtoPathMjs = {
1010
},
1111
};
1212

13+
// Note: We use tsc (via tsconfig.release.json) for .d.ts generation instead of tsdown's
14+
// built-in dts option due to issues with rolldown-plugin-dts.
15+
// See: https://github.com/sxzz/rolldown-plugin-dts/issues/121
1316
export default defineConfig([
1417
{
1518
entry: "src/**/*.ts",
1619
unbundle: true,
1720
format: "cjs",
1821
outDir: "lib",
1922
clean: true,
20-
dts: false,
23+
dts: false, // Use tsc for type declarations
2124
treeshake: false,
2225
external: ["../../../protos/compiledFirestore"],
2326
},
@@ -27,7 +30,7 @@ export default defineConfig([
2730
format: "esm",
2831
outDir: "lib/esm",
2932
clean: false, // Don't clean - need to keep cjs/ output
30-
dts: false,
33+
dts: false, // Use tsc for type declarations
3134
treeshake: false,
3235
plugins: [rewriteProtoPathMjs],
3336
},

0 commit comments

Comments
 (0)