-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Sql.js seems like really amazing pice of technology so I would like to use it in one of the projects.
The tech stack of project is
- sveltekit
- cloudflare workers
Started for the project was taken from here - https://developers.cloudflare.com/pages/framework-guides/deploy-a-svelte-kit-site/#setting-up-a-new-project
I would like to use sqlite inside svelte' loader function (+layout.server.ts) to be more specific. It is the code which runs on the server (cloudflare workers) due to fetch requests to load the data.
My setup looks like this:
import initSqlDb from 'sql.js/dist/sql-wasm.js';
const SQL = await initSqlDb();i've tried also this
import initSqlJs from "sql.js/dist/sql-wasm.js";
const SQL = await initSqlJs({
locateFile: file => `https://cdnjs.cloudflare.com/ajax/libs/sql.js/1.6.2/${file}`
});Here is the error I am getting:
As you can see, it is correltly linked to wasm.js version.
When I look inside sql-wasm.js file, I see that there is fs reference:
Is it possible to make this working somehow?
Metadata
Metadata
Assignees
Labels
No labels