Files
0ea61ae02b fix(dts): prefer declaration extensions over JS in exports-resolved paths (#1047)
## Summary

- Fix `dts_resolve_esm_match` to try TS/declaration extension
substitution (e.g. `.mjs` → `.d.mts`) **before** checking if the
original JS file exists, matching TypeScript's
`loadFileNameFromPackageJsonField` behavior
- Previously, `resolveDtsSync` would return `.mjs` instead of `.d.mts`
for packages like `magic-string` that have both the JS entry and its
declaration file

Closes #1046

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-03-05 11:59:13 +08:00
..