Configure Parcel bundler for threads.js
masterTo use threads.js with Parcel, you must import threads/register once at the very beginning of your application's master code. This registers the threads.js Worker implementation as the global Worker for your platform.
import { spawn } from "threads"
import "threads/register"
// ...
const work = await spawn(new Worker("./worker"))