You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a module from the ArcGIS API for JavaScript in the web worker, "npm run dev" works fine but "npm run build" (which, I think uses Rollup), fails with the error:
To preserve the export signature of the entry module "src\testWorker.ts", an empty facade chunk was created. This often happens when creating a bundle for a web app where chunks are placed in script tags and exports are ignored. In this case it is recommended to set "preserveEntrySignatures: false" to avoid this and reduce the number of chunks. Otherwise if this is intentional, set "preserveEntrySignatures: 'strict'" explicitly to silence this warning.
✓ 10 modules transformed.
[vite:worker] Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.
file: C:/.../svelte-vite-web-workers-issue/src/testWorker.ts?worker
error during build:
Error: Invalid value "iife" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.
Vite has a nice feature where you can add
?worker
to an import and it will create a web worker. (see https://vitejs.dev/guide/features.html#web-workers)When using a module from the ArcGIS API for JavaScript in the web worker, "npm run dev" works fine but "npm run build" (which, I think uses Rollup), fails with the error:
Replication Steps:
npm install
npm run dev
- notice it works finenpm run build
- build fails, with the above error (expected: build should work)The text was updated successfully, but these errors were encountered: