-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distribute ESM #63
Comments
a fellow guy suggested to add: "browser": {
"node:buffer": false
} into package.json He also said that |
This was addressed with #67, right? |
Maybe just partly...
I guess it would be best if you added a ESM output target format as well to this build config? Lines 5 to 16 in f0693d5
ofc I can With jsdeliver you can also add Apparently when adding "browser": {
"node:buffer": false
}, (it did not seem to help that i added this to package.json) 😕 In here you can still find things such as But it did seem to help that i added Line 288 in f0693d5
when the Buffer polyfill gets included then it never tries to add that's what i think is happening. |
I'm looking in the dist folder but can't find any ESM module, so i can't use import in browsers...
whenever i try do use
/+esm
with jsdeliver then it tries to be a smartas and import everything that it needs... including Buffer which i do not want/need.https://cdn.jsdelivr.net/npm/[email protected]/dist/index.js/+esm
I do not know if it's b/c you are using
Buffer
that makes it wanna import it.I really dislike that NodeJS added
buffer
onto the global namespace in the first place instead of depending on it like everything else ppl should really be usingimport Buffer from 'node:buffer'
or async import...i think you maybe can circumvent this if you instead use:
const Buffer = globalThis.Buffer
at the very top... but i'm not sure... really wished you could just remove all of nodejs Buffer stuff...The text was updated successfully, but these errors were encountered: