Avoid use of anonymous declaration of Asynchronous Module Definition (AMD) module#12554
Avoid use of anonymous declaration of Asynchronous Module Definition (AMD) module#12554adamshaylor wants to merge 2 commits intoemscripten-core:mainfrom
Conversation
|
Thank you for submitting a pull request! If this is your first PR, make sure to add yourself to AUTHORS. |
|
The PR description could perhaps be better. A don't know anything about require.js or what AMD means so maybe I'm not best placed to come up with a better one by maybe something like "Avoid use of anonymous define() in require.js mode"? Am I correct in understanding that only users of require.js will be effected by this change? |
|
@sbc100, that’s correct. AMD is the JavaScript module format used by require.js. This is a relatively obscure JS module format, especially since the advent of a native module format. Nevertheless, it is still around, and emscripten will cause it to break if the global Apologies for the broken unit tests. I’m looking into those. If you happen to have any pointers on those, I’d be much obliged. |
|
It looks like just one test failure. You should be able to reproduce it with: |
Per the require.js docs: > Mismatched anonymous define() modules... If you manually code a script > tag in HTML to load a script with an anonymous define() call, this > error can occur. https://requirejs.org/docs/errors.html#mismatch That is preciesly what happens in our case when we attempt to embed a custom build of the Draco decoder into a script loaded at runtime on a Magento website (which uses Require.js heavily). Jira reference: https://pollinate-jira.atlassian.net/browse/MTOC-3284
|
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant. |
Per the require.js docs:
https://requirejs.org/docs/errors.html#mismatch
That is preciesly what happens in our case when we attempt to embed a
custom build of the Draco decoder into a script loaded at runtime on a
Magento website (which uses Require.js heavily).