Upgrade to ESM + Snowpack + Webpack 5
eligrey opened this issue · comments
We should upgrade to Snowpack + Webpack 5 and distribute builds as ECMAScript modules. This may enable us to reference Web Worker URLs without having to inline workers into Blob URIs.
Webpack 5 adds support for this native Worker loader syntax:
new Worker(new URL("./worker.js", import.meta.url))
Postponed until Safari gains ESM Worker support.
We may also want to consider esbuild instead of Webpack 5 due to its better minification & build times.