Skip to content

Commit

Permalink
[Docs] Document EXPORT_ES6 implicit behavior (#21274)
Browse files Browse the repository at this point in the history
* It is implicitly enabled for .mjs output.
* MODULARIZE is implicitly enabled when EXPORT_ES6 is set.
  • Loading branch information
waywardmonkeys committed Feb 7, 2024
1 parent 38f9ad8 commit b166f25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion site/source/docs/tools_reference/settings_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1619,7 +1619,9 @@ EXPORT_ES6
==========

Export using an ES6 Module export rather than a UMD export. MODULARIZE must
be enabled for ES6 exports.
be enabled for ES6 exports and is implicitly enabled if not already set.

This is implicitly enabled if the output suffix is set to 'mjs'.

.. _use_es6_import_meta:

Expand Down
5 changes: 4 additions & 1 deletion src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,10 @@ var DETERMINISTIC = false;
var MODULARIZE = false;

// Export using an ES6 Module export rather than a UMD export. MODULARIZE must
// be enabled for ES6 exports.
// be enabled for ES6 exports and is implicitly enabled if not already set.
//
// This is implicitly enabled if the output suffix is set to 'mjs'.
//
// [link]
var EXPORT_ES6 = false;

Expand Down

0 comments on commit b166f25

Please sign in to comment.