diff --git a/src/shell.js b/src/shell.js index c354d6009fc01..851022e3c5005 100644 --- a/src/shell.js +++ b/src/shell.js @@ -133,9 +133,6 @@ var ENVIRONMENT_IS_WASM_WORKER = Module['$ww']; #if SHARED_MEMORY && !MODULARIZE // In MODULARIZE mode _scriptDir needs to be captured already at the very top of the page immediately when the page is parsed, so it is generated there // before the page load. In non-MODULARIZE modes generate it here. -#if EXPORT_ES6 -var _scriptDir = import.meta.url; -#else var _scriptDir = (typeof document != 'undefined' && document.currentScript) ? document.currentScript.src : undefined; if (ENVIRONMENT_IS_WORKER) { @@ -146,8 +143,7 @@ else if (ENVIRONMENT_IS_NODE) { _scriptDir = __filename; } #endif // ENVIRONMENT_MAY_BE_NODE -#endif -#endif +#endif // SHARED_MEMORY && !MODULARIZE // `/` should be present at the end if `scriptDirectory` is not empty var scriptDirectory = '';