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

Prefresh Webpack shouldn't assume the user is using NextJS #534

Closed
rschristian opened this issue Jan 16, 2024 · 1 comment · Fixed by #536
Closed

Prefresh Webpack shouldn't assume the user is using NextJS #534

rschristian opened this issue Jan 16, 2024 · 1 comment · Fixed by #536

Comments

@rschristian
Copy link
Member

A user saw this pop up due to a minor version resolution issues w/ a Preact-CLI app which surprised them. Can we check if Next exists before providing this? Or maybe add a more generic error message?

if (internalWebpackVersion !== externalWebpackVersion) {
throw new Error(`
Next is using webpack-version ${internalWebpackVersion} and you have ${externalWebpackVersion} installed.
Try installing ${
compiler.webpack ? compiler.webpack.version : 4
} locally.
Or if you want to try webpack 5 you can turn this on with { future: { webpack5:true } } in you next.config.js.
`);

@JoviDeCroock
Copy link
Member

A generic error message is probably a better shout as we don't support Next.JS anymore either way

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

Successfully merging a pull request may close this issue.

2 participants