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
This bundles for the browser using the default iife platform. When I run the asset build, it works and my app runs. However I get the following four warnings from require statements in the nodefs:
▲ [WARNING] Import "resolve" will always be undefined because the file "(disabled):path" has no exports [import-is-undefined]
node_modules/@electric-sql/pglite/dist/fs/nodefs.js:1:198:
1 │ ...r(t){super(t),this.rootDir=o.resolve(t),s.existsSync(o.join(this...
╵ ~~~~~~~
▲ [WARNING] Import "existsSync" will always be undefined because the file "(disabled):fs" has no exports [import-is-undefined]
node_modules/@electric-sql/pglite/dist/fs/nodefs.js:1:211:
1 │ ...his.rootDir=o.resolve(t),s.existsSync(o.join(this.rootDir))||s.m...
╵ ~~~~~~~~~~
▲ [WARNING] Import "join" will always be undefined because the file "(disabled):path" has no exports [import-is-undefined]
node_modules/@electric-sql/pglite/dist/fs/nodefs.js:1:224:
1 │ ...r=o.resolve(t),s.existsSync(o.join(this.rootDir))||s.mkdirSync(t...
╵ ~~~~
▲ [WARNING] Import "mkdirSync" will always be undefined because the file "(disabled):fs" has no exports [import-is-undefined]
node_modules/@electric-sql/pglite/dist/fs/nodefs.js:1:247:
1 │ ...nc(o.join(this.rootDir))||s.mkdirSync(this.rootDir)}async init(t...
╵ ~~~~~~~~~
Is there a way to get rid of these warnings? Why is my browser bundle including the nodefs?
N.b.: I've tried marking @electric-sql/pglite as external using "--external:@electric-sql/pglite" in the esbuild args list but that creates runtime errors:
Uncaught Error: Dynamic require of "@electric-sql/pglite" is not supported
The text was updated successfully, but these errors were encountered:
I'm using PGlite within a Phoenix app, which uses esbuild (by default) as its bundler. I have things working thanks to the pointers on #478 (comment)
Fwiw, my instantiation code (I'm using sync, live and vector) looks like this:
My esbuild config looks like this, using :
This bundles for the browser using the default
iife
platform. When I run the asset build, it works and my app runs. However I get the following four warnings from require statements in the nodefs:Is there a way to get rid of these warnings? Why is my browser bundle including the nodefs?
N.b.: I've tried marking
@electric-sql/pglite
as external using"--external:@electric-sql/pglite"
in the esbuild args list but that creates runtime errors:The text was updated successfully, but these errors were encountered: