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

bug: fail with yarn 3 + pnp + workspaces + typescript references #1440

Open
DiFuks opened this issue Mar 15, 2022 · 2 comments
Open

bug: fail with yarn 3 + pnp + workspaces + typescript references #1440

DiFuks opened this issue Mar 15, 2022 · 2 comments

Comments

@DiFuks
Copy link

DiFuks commented Mar 15, 2022

Expected Behaviour

ts-loader works with yarn 3 + pnp + workspaces + typescript references

Actual Behaviour

Link: #1145 (comment)

Fail:
image

Location of a Minimal Repository that Demonstrates the Issue.

https://github.com/DiFuks/ts-references

yarn tsc - working
yarn ts-node - working
yarn webpack:babel-loader - working
yarn webpack:ts-loader - not working :(

Module not found: Error: Can't resolve './showLib' in '/Users/difuks/PhpstormProjects/ts-references/entries/submodule/dist'

At the same time, with such an edit, everything starts to work. But in this case main uses the uncompiled version of submodule

Information about various build variations is stored here: https://github.com/DiFuks/ts-references/blob/master/entries/main/src/showLib.ts#L7

This workaround also works fine

With nodeLinker: node-modules in .yarnrc.yml things get a little better, but relative imports still don't work (../../submodule)

With symlinks: true the situation returns to the one that was in the "master" branch

@johnnyreilly
Copy link
Member

If you'd like to look into this I'll happily take a look at a pull request.

@DiFuks
Copy link
Author

DiFuks commented Mar 15, 2022

I removed js processing from ts-loader and everything worked as expected. As I understand it, this is the expected behavior: #465

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

2 participants