-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Monorepo with Yarn PnP in the root and standalone project with esbuild in a subdir #2495
Comments
This is working as intended, if you want a directory to not be part of the project you need to tell Yarn about it using pnpIgnorePatterns:
- "./prototypes/**" |
Closing because it sounds like this is working as intended, and there is an easy workaround available. |
I'm not sure it works as intended. Here's a demo repository that reproduces the problem: https://github.com/JanVoracek/esbuild-yarn-demo. There is also a GH Action demonstrating the failure: https://github.com/JanVoracek/esbuild-yarn-demo/actions/runs/2998205785 Also, it seems that Yarn can resolve the import but esbuild crashes on
|
Thank you for providing a way to reproduce this. It looks like the problem is that Yarn's regular expression for
I'm not sure what to do about this. Edit: Pretty-printed:
The problematic part is the use of |
Perhaps I can just manually strip |
We have a repository with the following structure:
In this case, the esbuild bundler doesn't work correctly because it finds the
.pnp.cjs
file in the repository root and tries to resolve dependencies using the PnP strategy - even though the esbuild project is not part of the Yarn workspaces and doesn't even use Yarn at all.The text was updated successfully, but these errors were encountered: