developit / workerize

🏗️ Run a module in a Web Worker.
https://github.com/developit/workerize-loader
4.35k stars 91 forks source link

Accept a module path instead of code string? #43

Open saschanaz opened 1 year ago

saschanaz commented 1 year ago

It seems this library current accepts code string (and somehow tries to convert it to CommonJS 🤔) but can it accept a module path? I guess it should be possible to generate a code to import the module from the given path.