-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Regression bug: Relative import of ES6 WASM modules from ES6 Modules does not work #9233
Comments
This fixes the problem reported by emscripten-core#9233 and by emscripten-core#8729 while fixing the regression bug causes by emscripten-core#8940
cc @VirtualTim |
Just added a pull request #9234 with a proposed Fix. Please do not hesitate to tell me if you do not like the solution. |
So if I'm understanding your use case right, your example uses I guess adding a new flag might be the only solution that keeps everyone happy. I don't really like it, there's already about 200 flags and I was hoping that the toolchain could determine what's best. This issue is also related to #5104. |
Hi Tim, |
Problem solved. Thanks guys |
…mscripten-core#9234) This fixes the problem reported by emscripten-core#9233 and by emscripten-core#8729 while fixing the regression bug causes by emscripten-core#8940
Is anyone still using the |
Regression bug introduced by the PR #8940 related to the bug #8729.
Problem :
The PR is based on the fact that 'document.currentScript.src' exists in ES6 modules.
This is not the case for VanillaJS ( no magic bundling ) for Firefox>=68 and Chrome>=76.
This causes any import of ES6 module which is not in the same directory that the source html file to fail.
Reproduce :
Temporary Fix :
Override the "locateFile" in the Module itself with a callback that enforce the WASM module path
Definitive Fix:
Enforce the usage of PTHREAD and WebWorker is not a good solution considering that this support is disable in almost all the main WebBrowser for now.
I would be for adding a flag to disable "import.meta.url" on demand. And enable it by default for ANY ES6_MODULE.
The text was updated successfully, but these errors were encountered: