Skip to content

SvelteKit example doesn't work on minor update - "Vite is unable to parse the worker options" #14

@khromov

Description

@khromov

Any help would be appreciated. Using the example here. There is a discussion here emscripten-core/emscripten#22394 and it seems related to the usage of dynamic worker options in the @transcribe/shout library: new Worker(new URL("shout.wasm.js",import.meta.url),workerOptions)

Repro:

npm i
npm update
npm run build

Error:

npm run build

> svelte-kit@0.0.1 build
> vite build

vite v5.4.19 building SSR bundle for production...
✓ 159 modules transformed.
vite v5.4.19 building for production...
✓ 101 modules transformed.
x Build failed in 116ms
x Build failed in 648ms
error during build:
[vite-plugin-sveltekit-compile] [commonjs--resolver] Vite is unable to parse the worker options as the value is not static.To ignore this error, please use /* @vite-ignore */ in the worker options.
file: /Users/k/Documents/GitHub/examples/svelte-kit/node_modules/@transcribe/shout/src/shout/shout.wasm.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions