as-module
Social Media Photo by Vlado Paunovic on Unsplash
A module that exports primitives that will bootstrap as module.
import { Worker, SharedWorker } from 'as-module';
new Worker('./worker.js');
new SharedWorker('./shared.js');
All instances will bootstrap with { type: 'module' } ability so that we can stop doing the awkward dance in every modern project based on workers' modules.
How to contribute?
If there are native APIs that require a { type: 'module' } somewhere while initializing, please just point me at those to be provided via this module too, thank you đ