Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ def test_export_es6_allows_export_in_post_js(self):
@parameterized({
'': ([],),
# load a worker before startup to check ES6 modules there as well
'pthreads': (['-pthread', '-sPTHREAD_POOL_SIZE=1'],),
# pass -O2 to ensure the worker JS file is minified with Acorn
'pthreads': (['-O2', '-pthread', '-sPTHREAD_POOL_SIZE=1'],),
})
def test_export_es6(self, args, package_json):
self.run_process([EMCC, test_file('hello_world.c'), '-sEXPORT_ES6',
Expand Down
1 change: 1 addition & 0 deletions tools/acorn-optimizer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2029,6 +2029,7 @@ try {
preserveParens: closureFriendly,
onComment: closureFriendly ? sourceComments : undefined,
sourceType: exportES6 ? 'module' : 'script',
allowAwaitOutsideFunction: true,
});
} catch (err) {
err.message += (() => {
Expand Down