You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can reproduce this issue when running this plugin on its own. Other plugins, such as node-resolve are known to cause issues.
I am running this plugin on .d.ts files generated by TypeScript. The plugin can consume .ts and even .js files (with allowJs: true), but this is known to cause issues.
This issue is not related to rolling up @types. The plugin ignores these by default, unless respectExternal is set. @types can contain hand-crafted code which is known to cause issues.
Code Snipped
Entry point: (test.d.mts):
// Your code that is causing problems.exporttype{myFunction}from"./myFunction.d.mts"
Checklist
Other plugins, such as
node-resolve
are known to cause issues..d.ts
files generated by TypeScript.The plugin can consume
.ts
and even.js
files (withallowJs: true
), but this is known to cause issues.@types
.The plugin ignores these by default, unless
respectExternal
is set.@types
can contain hand-crafted code which is known to cause issues.Code Snipped
Entry point: (
test.d.mts
):Where
myFunction.d.mts
is:And
myFunction.mts
is:Error Message
There is no error message but the output is:
Which obviously is wrong for a
.d.mts
file.Removing the
myFunction.mts
file makes the plugin output the correct code:Rollup config:
I made a repo for easy cloning & reproduce the problem described here.
The text was updated successfully, but these errors were encountered: