Update Closure Compiler (#26205)

I need it for https://github.com/facebook/react/pull/26187.

We need to specify specifically the output mode `ECMASCRIPT5_STRICT` to
remove `const` from the Fizz runtime.
This commit is contained in:
Sebastian Markbåge
2023-02-20 13:27:13 -05:00
committed by GitHub
parent 2cc54b57ed
commit 80cf4a099e
4 changed files with 41 additions and 35 deletions

View File

@@ -388,13 +388,15 @@ function getPlugins(
bundleType !== NODE_ESM &&
closure({
compilation_level: 'SIMPLE',
language_in: 'ECMASCRIPT_2018',
language_in: 'ECMASCRIPT_2020',
language_out:
bundleType === NODE_ES2015
? 'ECMASCRIPT_2018'
? 'ECMASCRIPT_2020'
: bundleType === BROWSER_SCRIPT
? 'ECMASCRIPT5'
: 'ECMASCRIPT5_STRICT',
emit_use_strict:
bundleType !== BROWSER_SCRIPT && bundleType !== NODE_ESM,
env: 'CUSTOM',
warning_level: 'QUIET',
apply_input_source_maps: false,