-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Preact with Next.js 12.0.3 doesn't dedupe #31538
Comments
Hey, I am hitting this as well while clearing a bunch of security warnings and performing general maintenance on my project. Is there any way I can help with this? From what I understand this entirely breaks using Preact with Next.js 12 (when using hooks which arguably will be a common usecase). Update: I "fixed" this by replacing all |
Any news on this @timneutkens, anything we can do to help out? |
Doesn't work for me with latest next.js and latest preact... If I do that I get: Any news about this? EDIT: Works fine if I add |
Any updates here? Especially if I look at Next.js 13 |
Originally posted by @JoviDeCroock in #30347 (comment):
Hey y'all,
I quickly dove into this and used the reproduction so kindly provided by @rayriffy (thank you 🙌 )! So upgrading
@preact/compat
to 17.0.3 removes the tracing issue. However it surfaces another issue, Next seems to have an issue with deduping packages.This is mainly an assumption because I've seen it before when porting
prefresh
to next 12, I saw that as soon as I imported Preact from normal preact it would have two duplicate imports of our options hooks.The new issue we run into then requires us to comment out the
context
import so we don't duplicate options hooks throughout the codebase 😅EDIT: I've tried adding
@preact/compat
here which did not helpEDIT 2: oh it doesn't happen when we use non-static-generation
When I add the following:
it works correctly, if I remove that and it moves to
static generation
we end up with:The error
The text was updated successfully, but these errors were encountered: