-
Notifications
You must be signed in to change notification settings - Fork 91
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
Detection of optimization libraries incorrect with yarn berry + workspaces #227
Comments
Seems that So the trick is probably to use a pnp-compatible package resolver like one referenced in the yarn article above. |
I don't know what are the pros and cons of libraries out there but Webpack has one. https://github.com/webpack/enhanced-resolve |
Perhaps the real move is to just use version 3 though. |
It is perfectly fine to use it for that, but only if you require from a location that declares them, i'm guessing the |
@osdiab how did you solve it? I tried to require |
Lol I just gave up on using it with pnp |
Thanks for the great project!
With v2, I was using it in one nextJS project but then I made a new one where my NextJS project is part of a yarn workspaces monorepo, but when I start it up I get the error that image compression libraries aren't present.
so I moved the
imagemin
package deps to the rootpackage.json
of the yarn workspace, and nownext-optimized-images
is happy. It seems thatnext-optimized-images
isn't looking at the actually installed packages for the monorepo subpackage, but I haven't looked into the code to see why that is.The text was updated successfully, but these errors were encountered: