[x] 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.
[x] 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.
When using this plugin in combination with [rollup-plugin-typescript](), the following error occurs:
[!] RollupError: "Foo" is not exported by "src/foo.ts", imported by "some-file.ts".
https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module
some-file.ts
[[Stack Trace]]
It'd be nice if there was some way to have submodules import from one another in the distribution files.
For example, if #bar imports a type from #foo, that type won't be bundled into #bar.
This is similar to respectExternal but for internal externals?? I don't think there is currently a way to get respectExternal to do this.
Checklist
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, unlessrespectExternal
is set.@types
can contain hand-crafted code which is known to cause issues.Code Snipped
Issue
#foo
doesn't get resolved.Additional
When using this plugin in combination with [rollup-plugin-typescript](), the following error occurs:
Workaround
Use
compilerOptions.paths
:Or without two sources of truth:
Additional Request
It'd be nice if there was some way to have submodules import from one another in the distribution files. For example, if
#bar
imports a type from#foo
, that type won't be bundled into#bar
. This is similar torespectExternal
but for internal externals?? I don't think there is currently a way to getrespectExternal
to do this.