-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Imports from libraries outside @types and typeRoots are inlined #74
Comments
Hi @foxable, I'm not familiar with If Importing modules from |
Hi @timocov, you can use the
Without a import * as module1 from "../module1/index"; With a import * as module1 from "module1"; This decouples both modules and allows building them iteratively. In my case, I reference a bundled module declaration instead of the TS entry point (which is generated using A local, empty |
@foxable thank you for clarification! I need to play with that, but anyway it looks like a bug and we need to fix it. (but if you can provide an example of repro where I can debug the issue - it would be awesome) |
@timocov thank you for adding this bug to the next milestone. I think a good approach could be to treat every Regarding a repro, do you need more examples or something ready to clone locally? You can use the example above as a minimal repro. |
Yeah, something like that - with folders, sources and tsconfigs (then I'll use it that example as test case). |
At first thought it looks like the issue has the same reason as #54, #59 (comment) and #62. |
You can find the repro here: foxable/dts-bundle-generator-paths-bug If you have any further questions or need some help feel free to ask. |
I created PR #78 to fix the bug, which also includes a test case. |
@foxable Wow, that's amazing! Let's continue discussion there. |
The PR was closed, because it became obsolete. The problem can be solved using a |
I am encountering the same problem in my monorepo, and disappointedly to find that Local Paths will limit users from publishing packages to NPM. |
You are free to publish packages to NPM when using local paths. The only thing you need to ensure is that the package name and the name of the dependency pointing to the local path are identical. |
Bug report
Imports from libraries outside of
@types
andtypeRoots
are always inlined, even when explicitly specified as external import.Input code
foo.ts
externals/bar.d.ts
tsconfig.json
Expected output
Actual output
Additional context
CLI options:
The text was updated successfully, but these errors were encountered: