Commit c7041f7
fix(browser): bundle binding types in dts output (#8930)
Fixes #8929
The browser package's `.d.mts` files reference `binding.cjs` as
external, but no type declaration file exists in the published package.
This is because `resolveWasiBinding()` marks `binding.cjs` as `external:
'relative'` for all importers, including `.d.ts` files from
`rolldown-plugin-dts`. The dts resolver sees the external flag and
passes it through without bundling the types.
Fix: skip the external redirect when the importer is a `.d.ts` file, so
the dts plugin can resolve and bundle binding types inline.
Co-authored-by: IWANABETHATGUY <[email protected]>1 parent 6ab459a commit c7041f7
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
| |||
0 commit comments