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
I have published my library to the JSR registry instead of NPM, but I am having a weird warning when using it on a Vite bundled project:
[plugin vite:resolve] Module "node:fs" has been externalized for browser compatibility, imported by "C:/Users/Hydro/Repository Groups/Linux Metro/linuxmetro/desktop/node_modules/@hydroper/fluent/src/fsloader.nodejs.js". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin vite:resolve] Module "node:path" has been externalized for browser compatibility, imported by "C:/Users/Hydro/Repository Groups/Linux Metro/linuxmetro/desktop/node_modules/@hydroper/fluent/src/fsloader.nodejs.js". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
node_modules/@hydroper/fluent/src/fsloader.nodejs.js (12:22): "readFileSync" is not exported by "__vite-browser-external", imported by "node_modules/@hydroper/fluent/src/fsloader.nodejs.js".
node_modules/@hydroper/fluent/src/fsloader.nodejs.js (12:40): "resolve" is not exported by "__vite-browser-external", imported by "node_modules/@hydroper/fluent/src/fsloader.nodejs.js".
I am guessing that JSR is pre-bundling my @hydroper/fluent library and not looking into the browser field in package.json:
I have published my library to the JSR registry instead of NPM, but I am having a weird warning when using it on a Vite bundled project:
I am guessing that JSR is pre-bundling my
@hydroper/fluent
library and not looking into thebrowser
field inpackage.json
:Notice the "browser" field. I'm thinking Vite and JSR aren't doing anything with it.
Here is the library's
jsr.json
:Here's my consumer project's
vite.config.ts
:To confirm, JSR removes the
browser
field frompackage.json
when looking intonode_modules
:The text was updated successfully, but these errors were encountered: