Skip to content

Commit c9efa16

Browse files
authored
Simplify settings implications when outputting .mjs. NFC (#23546)
Using default_settings here so we don't clobber a user setting. The EXPORT_ES6 setting already implies MODULARIZE below.
1 parent 342037c commit c9efa16

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/link.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,7 @@ def phase_linker_setup(options, state): # noqa: C901, PLR0912, PLR0915
761761
diagnostics.warning('unused-command-line-argument', f'{s} is only valid when generating JavaScript output')
762762

763763
if options.oformat == OFormat.MJS:
764-
settings.EXPORT_ES6 = 1
765-
default_setting('MODULARIZE', 1)
764+
default_setting('EXPORT_ES6', 1)
766765

767766
if settings.MODULARIZE and settings.MODULARIZE not in [1, 'instance']:
768767
exit_with_error(f'Invalid setting "{settings.MODULARIZE}" for MODULARIZE.')

0 commit comments

Comments
 (0)