Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Dec 15, 2024

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 #9234 and #8729

@@ -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,
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

@sbc100 sbc100 force-pushed the USE_ES6_IMPORT_META branch 2 times, most recently from 4e72877 to 2a546ac Compare December 17, 2024 00:37
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
@sbc100 sbc100 force-pushed the USE_ES6_IMPORT_META branch from 2a546ac to 79f3fef Compare December 18, 2024 02:40
@sbc100 sbc100 closed this Jan 3, 2025
@sbc100 sbc100 deleted the USE_ES6_IMPORT_META branch January 3, 2025 22:45
@sbc100 sbc100 restored the USE_ES6_IMPORT_META branch January 3, 2025 23:00
@sbc100 sbc100 reopened this Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants