-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
Failed to import - h3-js #250
Comments
@YousefED thanks, now it works |
Wow awesome, thanks for the quick response! Trying to understand the issue and inner workings of esm.sh, can you explain why in esm.sh the Does esm.sh reuse ESM compatible outputs from the module (i.e.: h3-js.es.js), or does it always recompile the entire source? |
in this issue, h3 code includes |
it transpiles code follow the js file defined by |
Failing module
h3-js fails to import from a browser environment. You can see that the official esm build (https://unpkg.com/[email protected]/dist/h3-js.es.js) optionally imports the
fs
module, but only when in a node-based environment. My guess is that the esm.sh version always imports thefs
module, and therefore breaks.Error message
Error: 500 https://cdn.esm.sh/error.js?type=unsupported-nodejs-builtin-module&name=fs&importer=h3-js at http://127.0.0.1:3000/static/js/15.chunk.js:457:28
Additional info
The text was updated successfully, but these errors were encountered: