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
esm
output leaves behind dead namespace import
#2895
Comments
9 tasks
Thanks, there was really something we missed in our code, fix at #2900 |
Amazing how quickly you fix these things, thanks :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use
import * as ts from "typescript";
inside my code.When targeting
esm
output in rollup, all the imports are rewritten to specific identifiers, but oneimport * as ts
is left behind, which is not used anywhere in the resulting bundle.The
commonjs
output works correctly in this regard.How Do We Reproduce?
I wasn’t really able to reduce the testcase. I can’t reproduce it with simple examples in the REPL.
A whole repo repro is here:
https://github.com/Swatinem/rollup-plugin-dts/tree/v1.0.0
Expected Behavior
There should be no unused
import * as ts
left in the code.Actual Behavior
One
import * as ts
in left behind, but the resultingts
identifier is not referenced anywhere in the code. All the other namespace imports are resolved to specific imports.See the output here:
https://unpkg.com/rollup-plugin-dts@1.0.0/dist/rollup-plugin-dts.mjs
The text was updated successfully, but these errors were encountered: