Skip to content

Support ES6 module syntax in Acorn, Babel and Closure#23730

Open
kleisauke wants to merge 21 commits intoemscripten-core:mainfrom
kleisauke:es6-acorn-closure
Open

Support ES6 module syntax in Acorn, Babel and Closure#23730
kleisauke wants to merge 21 commits intoemscripten-core:mainfrom
kleisauke:es6-acorn-closure

Conversation

@kleisauke
Copy link
Collaborator

@kleisauke kleisauke commented Feb 23, 2025

Acorn, Babel and Closure are now made aware of ES6 module syntax
when linking with -sEXPORT_ES6. The previous mangling of top-level
await, import.meta, and dynamic import() is tightened to only
mangle top-level await when Closure is enabled, since this is the
only construct not supported there.

This file is not included when building with `-sMODULARIZE=instance`.
This is an automatic change generated by tools/maint/rebaseline_tests.py.

The following (6) test expectation files were updated by
running the tests with `--rebaseline`:

```
codesize/test_codesize_minimal_esm.json: 2504 => 2427 [-77 bytes / -3.08%]
codesize/test_minimal_runtime_code_size_hello_webgl2_wasm.json: 13199 => 13656 [+457 bytes / +3.46%]
codesize/test_minimal_runtime_code_size_hello_webgl2_wasm2js.json: 18537 => 19154 [+617 bytes / +3.33%]
codesize/test_minimal_runtime_code_size_hello_webgl2_wasm_singlefile.json: 15132 => 15604 [+472 bytes / +3.12%]
codesize/test_minimal_runtime_code_size_hello_webgl_wasm.json: 12737 => 13163 [+426 bytes / +3.34%]
codesize/test_minimal_runtime_code_size_hello_webgl_wasm2js.json: 18063 => 18652 [+589 bytes / +3.26%]

Average change: +2.24% (-3.08% - +3.46%)
```
This is an automatic change generated by tools/maint/rebaseline_tests.py.

The following (1) test expectation files were updated by
running the tests with `--rebaseline`:

```
codesize/test_codesize_minimal_esm.json: 2504 => 2474 [-30 bytes / -1.20%]

Average change: -1.20% (-1.20% - -1.20%)
```
This is an automatic change generated by tools/maint/rebaseline_tests.py.

The following (1) test expectation files were updated by
running the tests with `--rebaseline`:

```
codesize/test_codesize_minimal_esm.json: 2494 => 2525 [+31 bytes / +1.24%]

Average change: +1.24% (+1.24% - +1.24%)
```
This is an automatic change generated by tools/maint/rebaseline_tests.py.

The following (1) test expectation files were updated by
running the tests with `--rebaseline`:

```
codesize/test_codesize_minimal_esm.json: 2525 => 2521 [-4 bytes / -0.16%]

Average change: -0.16% (-0.16% - -0.16%)
```
@kleisauke kleisauke changed the title Support ES6 module syntax in Acorn and Closure Support ES6 module syntax in Acorn, Babel and Closure Jan 19, 2026
@kleisauke kleisauke marked this pull request as ready for review January 19, 2026 10:42
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.

2 participants