-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typescript-transform-paths
does not run on .d.ts
files after upgrade to Rollup 4
#466
Comments
typescript-transform-paths
does not run on .d.ts
files after upgrade to Rollup 4
Thanks for reporting this with many details and a helpful repro! Rollup changesThere were very few changes in Rollup v4 for plugins, so the only one that I can think might affect this is that The However, that means that those files were only resolved because rpt2 resolved them itself, and otherwise they were not picked up by Rollup's JS resolver (after they were compiled to JS).
|
Yea I actually can't reproduce this in your repro, so I'm gonna guess you had a cache issue. ❯ yarn && yarn build
# ...
yarn run v1.22.19
$ yarn clean
$ rimraf dist
$ rollup --config rollup.config.mjs
src/index.ts → dist...
created dist in 665ms
✨ Done in 2.18s.
❯ cat dist/index.d.ts
export { print } from "./dep"; With
Same ordering (might be a Rollup v4 thing?), but it does say Also thought it's worth mentioning that your |
Sorry for late reply. I've been out sick. Thank you for the in-depth analysis! Thanks for the tip. I forgot I had set repo globally on my computer. I've fix the yarn.lock file now. |
Troubleshooting
Does
tsc
have the same output? If so, please explain why this is incorrect behaviorNo,
tsc
alone works as expected as long asts-patch
successfully ran.@rollup/plugin-typescript
as well, but it has other issues so wantrollup-plugin-typescript2
to work.Does your Rollup plugin order match this plugin's compatibility? If not, please elaborate
Only got one plugin in example.
Can you create a minimal example that reproduces this behavior? Preferably, use this environment for your reproduction
https://github.com/SimmeNilsson/rollup_relative_path_repro
What happens and why it is incorrect
I'm using
ts-patch
to supporttypescript-transform-paths
in order to transform my imports paths into relative paths.Prior to rollup 4 it was working well for both the generated
.js
and.d.ts
files.But after upgrading to rollup 4, the imports of the
.d.ts
files are not updated.Comparing logs with verbosity 3 this part is missing in rollup 4 compared to rollup 3 after line:
Missing lines:
Environment
Windows 11, VS Code, node 20.9.0, yarn 1.22.21
Versions
:rollup.config.mjs
:tsconfig.json
:package.json
plugin output with verbosity 3
:The text was updated successfully, but these errors were encountered: