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

Update with-preact example to use webpack 5 #26826

Open
sedlukha opened this issue Jul 1, 2021 · 5 comments · May be fixed by #30394
Open

Update with-preact example to use webpack 5 #26826

sedlukha opened this issue Jul 1, 2021 · 5 comments · May be fixed by #30394

Comments

Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

7 participants
@timneutkens @sedlukha @JoviDeCroock @nataliemarleny @repository @DeviousLab and others
@sedlukha
Copy link
Contributor

@sedlukha sedlukha commented Jul 1, 2021

What version of Next.js are you using?

11.0.1

What version of Node.js are you using?

14.16.1

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

Vercel

Describe the Bug

Next.js 11 with webpack 5 seems to break the using-preact example.

Error: Cannot find module 'webpack/lib/dependencies/ConstDependency'

Expected Behavior

Should work with webpack 5. Everything is ok with webpack5: false.

To Reproduce

https://stackblitz.com/edit/nextjs-preact-webpack5?file=next.config.js

@repository
Copy link

@repository repository commented Jul 2, 2021

It should be noted building the application will still work. It seems to be only an issue when running the dev server.

@timneutkens timneutkens changed the title Next.js 11 + preact + webpack 5 = 💔 Update with-preact example to use webpack 5 Jul 2, 2021
@DeviousLab

This comment has been hidden.

@DeviousLab
Copy link

@DeviousLab DeviousLab commented Jul 14, 2021

@timneutkens I think this issue can be closed now as the stackblitz link in the issue now runs without any issues!

@nataliemarleny
Copy link
Contributor

@nataliemarleny nataliemarleny commented Aug 14, 2021

After investigating - I think that @prefresh/next needs to cut a release including preactjs/prefresh#361 before this issue can be resolved. The using-preact example cannot be upgraded to next@11 / webpack@5 without @prefresh/next peerDependences accepting Next 11.

Current transitive dependency of using-preact is @prefresh/next@1.4.6.

Compare the peerDependencies of:
@prefresh/next@1.4.6: https://github.com/preactjs/prefresh/blob/%40prefresh/next%401.4.6/packages/next/package.json
@prefresh/next@main: preactjs/prefresh@573417f

cc @JoviDeCroock

@JoviDeCroock
Copy link

@JoviDeCroock JoviDeCroock commented Aug 14, 2021

That PR is published in latest normally 😅 I'll try to double check tomorrow, but latest prefresh/webpack has this, should maybe bump the dep in prefresh next

@arturparkhisenko arturparkhisenko linked a pull request that will close this issue Oct 27, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment