Some projects exploring different ways to create web-workers
MIT License
This repo contains 4 directories to showcase different ways to work with a Web-Worker in JavaScript.
This directory showcases the native approach of using a worker.
Showcases how a script file can be used as a worker. Uses this webpack plugin.
Uses awesome module by Jason Miller and that is Workerize. Allows us to move a module into web-worker. Basically you'll be writing you web-worker in a function that accepts a tagged template literal.
Uses workerize-loader webpack-plugin. Best choice in my opinion.
First clone
the repo.
Then cd
into any of them. For eg.
cd workerize-loader
Install required dependencies.
yarn
Start the development server.
yarn start
Visit :4001