Should we use import.meta.url
to load .data
packages when enabling ESM?
#21202
guyutongxue
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Sounds reasonable. I guess that woulds mean some kind of new Can I ask, is there some reason why you don't use |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
When enabling
-sEXPORT_ES6
, we load.wasm
relatively to.js
automatically by usingimport.meta.url
(ifModule.locateFile
not provided):emscripten/src/preamble.js
Line 626 in ce5114b
But when loading
.data
files, the generated code just examinesModule.locateFile
, or else the raw file name is used:emscripten/tools/file_packager.py
Line 770 in ce5114b
This is some kind of inconsistence... would it better to make
loadPackage
supportimport.meta.url
?Beta Was this translation helpful? Give feedback.
All reactions