-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Description
Was having some trouble getting worker path working with vite, ran into this:
https://stackoverflow.com/questions/67995082/how-to-create-web-worker-in-a-sveltekit-app-on-vercel
Basically I got it working this way:
const sqliteWorkerPath = new URL('./sqlite-worker.mjs', import.meta.url).href
const filename = '/mydb.sqlite3';
const sqlite = new SqliteClient(filename, sqliteWorkerPath);Problem right now I believe is with how vite manages imports, since im getting the following error:
[vite] Internal server error: Missing "./src/comlink.mjs" specifier in "@sqlite.org/sqlite-wasm" package
Plugin: vite:import-analysis
File: /home/mitch/Projects/supertokens-poc/src/lib/db/sqlite-worker.mjs
Ill be trying to tackle this but if anyone wants to help out: https://stackblitz.com/edit/sveltejs-kit-template-default-ubkpkr
Metadata
Metadata
Assignees
Labels
No labels