Skip to content

Commit aa391e3

Browse files
authored
fix(devframe): keep whenexpr types external in dts bundling (#100)
1 parent a475109 commit aa391e3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

packages/devframe/tsdown.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ const deps = {
2323
'terser',
2424
'@jridgewell/trace-mapping',
2525
],
26+
// `whenexpr` is runtime-only bundled (see `onlyBundle` below); its
27+
// declaration file mixes type-only and value named exports
28+
// (`export { type WhenExpression, evaluateWhen, ... }`) in a way that
29+
// trips up rolldown's dts bundler when it tries to inline the type
30+
// graph too (spuriously drops the `type` modifier off the merged
31+
// re-export, then can't find `WhenExpression` as a value export). Leave
32+
// `whenexpr`'s types external and let dts consumers resolve them
33+
// straight from the published package.
34+
dts: {
35+
neverBundle: ['whenexpr'],
36+
},
2637
onlyBundle: [
2738
'acorn',
2839
'bundle-name',

0 commit comments

Comments
 (0)