preactjs/prefresh

Prefresh Webpack shouldn't assume the user is using NextJS

rschristian opened this issue · 1 comments

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.
`);

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