@@ -2075,15 +2075,15 @@ def phase_final_emitting(options, state, target, wasm_target):
2075
2075
# optimize by Closure, or unoptimalities that were left behind by processing
2076
2076
# steps that occurred after Closure.
2077
2077
if settings .MINIMAL_RUNTIME == 2 and settings .USE_CLOSURE_COMPILER and settings .DEBUG_LEVEL == 0 :
2078
- shared .run_js_tool (utils .path_from_root ('tools/unsafe_optimizations.js ' ), [final_js , '-o' , final_js ], cwd = utils .path_from_root ('.' ))
2078
+ shared .run_js_tool (utils .path_from_root ('tools/unsafe_optimizations.mjs ' ), [final_js , '-o' , final_js ], cwd = utils .path_from_root ('.' ))
2079
2079
save_intermediate ('unsafe-optimizations' )
2080
2080
# Finally, rerun Closure compile with simple optimizations. It will be able
2081
2081
# to further minify the code. (n.b. it would not be safe to run in advanced
2082
2082
# mode)
2083
2083
final_js = building .closure_compiler (final_js , advanced = False , extra_closure_args = options .closure_args )
2084
2084
# Run unsafe_optimizations.js once more. This allows the cleanup of newly
2085
2085
# unused things that closure compiler leaves behind (e.g `new Float64Array(x)`).
2086
- shared .run_js_tool (utils .path_from_root ('tools/unsafe_optimizations.js ' ), [final_js , '-o' , final_js ], cwd = utils .path_from_root ('.' ))
2086
+ shared .run_js_tool (utils .path_from_root ('tools/unsafe_optimizations.mjs ' ), [final_js , '-o' , final_js ], cwd = utils .path_from_root ('.' ))
2087
2087
save_intermediate ('unsafe-optimizations2' )
2088
2088
2089
2089
fix_es6_import_statements (final_js )
0 commit comments