I'm developing a chrome extension, this is the worker code, which i managed to get working in production:
However, In debug, I get the following:
worker code
import { PGlite } from '../../../../node_modules/@electric-sql/pglite/dist/index.js'
import { worker } from '../../../../node_modules/@electric-sql/pglite/dist/worker/index.js'
import { pg_trgm } from '../../../../node_modules/@electric-sql/pglite/dist/contrib/pg_trgm.js'
worker({
async init(options) {
const pg = new PGlite('opfs-ahp://neotab/neotab.db', {
...options,
debug: import.meta.env.DEV,
extensions: { pg_trgm },
})
// If you want run any specific setup code for the worker process, you can do it here.
return pg
},
})
console.log('Worker process started')
if debug is false, i get Failed to fetch extension: pg_trgm TypeError: Failed to fetch
if debug is true, I see the following output, is this a false positive? as it seems in subsequent messages pg trgm is available.
Mainly, this issue happens in the newtab page (the one i want to use), but on localhost:5173/newtab, the error does not show up.
I'm developing a chrome extension, this is the worker code, which i managed to get working in production:
However, In debug, I get the following:
worker code
if debug is false, i get Failed to fetch extension: pg_trgm TypeError: Failed to fetch
if debug is true, I see the following output, is this a false positive? as it seems in subsequent messages pg trgm is available.
Mainly, this issue happens in the newtab page (the one i want to use), but on localhost:5173/newtab, the error does not show up.