c46e99d346
## Documentation / Examples - [x] Make sure the linting passes *** Related to #23607 Instead of using a third-party loader `worker-plugin`, we leverage the use of `webpack 5` built-in worker support. https://nextjs.org/docs/messages/webpack5 https://webpack.js.org/guides/web-workers/ |
||
---|---|---|
.. | ||
pages | ||
utils | ||
.gitignore | ||
next.config.js | ||
package.json | ||
README.md | ||
worker.js |
WebWorker example
This example shows how to run code in WebWorkers by utilizing webpack 5.
Deploy your own
Deploy the example using Vercel:
How to use
Execute create-next-app
with npm or Yarn to bootstrap the example:
npx create-next-app --example with-web-worker with-web-worker-app
# or
yarn create next-app --example with-web-worker with-web-worker-app
Deploy it to the cloud with Vercel (Documentation).