@@ -2075,15 +2075,15 @@ def phase_final_emitting(options, state, target, wasm_target):
20752075 # optimize by Closure, or unoptimalities that were left behind by processing
20762076 # steps that occurred after Closure.
20772077 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 ('.' ))
20792079 save_intermediate ('unsafe-optimizations' )
20802080 # Finally, rerun Closure compile with simple optimizations. It will be able
20812081 # to further minify the code. (n.b. it would not be safe to run in advanced
20822082 # mode)
20832083 final_js = building .closure_compiler (final_js , advanced = False , extra_closure_args = options .closure_args )
20842084 # Run unsafe_optimizations.js once more. This allows the cleanup of newly
20852085 # 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 ('.' ))
20872087 save_intermediate ('unsafe-optimizations2' )
20882088
20892089 fix_es6_import_statements (final_js )
0 commit comments