Open tysonstolarski opened 1 month ago
Same issues with Service Worker... not able to ignore such patters, even despite of !service.mjs
or !(service).mjs
.
using let worker_import = await import("@x.worker.js?worker&inline");
worked for me
@nikoPLP yes, but that's making a packaging decision at all the call sites for web/service workers. Ideally the application code stays agnostic to how the final scripts are bundled up, and it's just the configuration of this singlefile plugin that controls inlining vs normal vite packaging.
It looks like web worker js files with the ?worker suffix are ignored by this plugin.
My app uses an import such as:
My output produces:
I think it's just a matter of updating the
isJsFile
regex at https://github.com/richardtallent/vite-plugin-singlefile/blob/main/src/index.ts#L42 ?