-
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
Remove USE_ES6_IMPORT_META setting #23171
base: main
Are you sure you want to change the base?
Conversation
@@ -44,7 +44,7 @@ export function processMacros(text, filename) { | |||
// Also handles #include x.js (similar to C #include <file>) | |||
export function preprocess(filename) { | |||
let text = read(filename); | |||
if (EXPORT_ES6 && USE_ES6_IMPORT_META) { | |||
if (EXPORT_ES6) { | |||
// `eval`, Terser and Closure don't support module syntax; to allow it, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential follow up: I'm pretty sure closure supports module syntax now. Not sure about terser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into this and will try to come up with followup. For now is seems like the eval
phase is the one were we still need this.
4e72877
to
2a546ac
Compare
This setting was added (IIUC) as a temporary workaround for the lack or support for `import.meta` in browser and tooling. However `import.meta` has been at stage 4 for almost 5 years now: tc39/proposal-import-meta#21 Webback (released in 2020) also has builtin support for `import.meta`, so I would hope the use case for disabling this setting no longer exists. See emscripten-core#9234 and emscripten-core#8729
2a546ac
to
79f3fef
Compare
This setting was added (IIUC) as a temporary workaround for the lack or support for
import.meta
in browser and tooling.However
import.meta
has been at stage 4 for almost 5 years now: tc39/proposal-import-meta#21Webback (released in 2020) also has builtin support for
import.meta
, so I would hope the use case for disabling this setting no longer exists.See #9234 and #8729