Using with Nitro #1139
Unanswered
jamesarosen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm building a site with Tanstack-Start, Vite, Nitro.
When I compile for production release, Nitro puts H3 in
_libs/h3-js.mjs. H3's Emscripten build creates this:In an
.mjsfile,ENVIRONMENT_IS_NODE === true, but__dirnameis not defined.The WASM actually gets inlined as base64, so the
scriptDirectoryisn't needed for file loading.My current solution is to have Vite rewrite the file before bundling:
Are there better options?
Beta Was this translation helpful? Give feedback.
All reactions