You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot use WebWorkers in latest version of next.js. Support is broken when running in Vercel cloud. I can't tell if it's Webpack 5, Babel or Next but it seems to be related to the contenthash rule of the output filename.
It works locally in dev, but deployed to Vercel causes a 404 for the worker file.
Expected Behavior
Expect it to load the worker.
To Reproduce
I've created a minimal NextJS 10.2 example repo that reproduces the bug (and demonstrates a workaround):
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 28, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
10.2.0
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
Cannot use WebWorkers in latest version of next.js. Support is broken when running in Vercel cloud. I can't tell if it's Webpack 5, Babel or Next but it seems to be related to the contenthash rule of the output filename.
It works locally in dev, but deployed to Vercel causes a 404 for the worker file.
Expected Behavior
Expect it to load the worker.
To Reproduce
I've created a minimal NextJS 10.2 example repo that reproduces the bug (and demonstrates a workaround):
https://github.com/jhaynie/nextjs-webworker-bug
This is deployed to vercel at
https://nextjs-webworker-bug.vercel.app/
If you change
[contenthash]
to[fullhash]
in webpack, it works.The text was updated successfully, but these errors were encountered: