Skip to content
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

Inferred TS declaration imports in monorepo are changed to relative imports #9441

Closed
LiamMartens opened this issue Jul 19, 2019 · 4 comments
Closed

Comments

@LiamMartens
Copy link

Bug report

For some reason when generating ts declaration files, using either ts-loader or awesome-typescript-loader, the imports to local packages in the monorepo are changed to relative imports. They should remain as module imports.

What is the current behavior?
When building both packages the inferred lerna package import in the declaration files of typescript in the my-package package are converted to a relative import.

If the current behavior is a bug, please provide the steps to reproduce.
Reproduction repository and steps can be found here

What is the expected behavior?
These imports that reference a lerna package and are not explicitly specified should not be changed to a relative import and instead should remain a module import.

Other relevant information:
webpack version: 4.36.1
Node.js version: v11.15.0
Operating System: PopOS! 18.10
Additional tools: yarn, lerna

@sokra
Copy link
Member

sokra commented Jul 19, 2019

Unsure how webpack is related to this

@johnnyreilly

@LiamMartens
Copy link
Author

LiamMartens commented Jul 19, 2019

@sokra I am not 100% certain whether it is webpack or not, however it happens with both ts-loader and awesome-typescript-loader which led me to believe it has something to do with webpack's module resolving (sidenote here is that building the package with just tsc does work as expected)

@alexander-akait
Copy link
Member

Please open an issue ts-loader or awesome-typescript-loader, sorry for delay, not related to webpack

@johnnyreilly
Copy link
Contributor

Possibly related to this TypeStrong/ts-loader#822 - long time ago though so I forget

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants