Skip to content

Commit b576dfe

Browse files
committed
Set BUNDLE_SCRIPT's GCC output format to ES5
This removes the automatic 'use strict' directive, which we don't need.
1 parent 054141f commit b576dfe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/rollup/build.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,12 @@ function getPlugins(
382382
// https://github.com/facebook/react/issues/10909
383383
assume_function_wrapper: !isUMDBundle,
384384
renaming: !shouldStayReadable,
385+
language_out:
386+
bundleType === BROWSER_SCRIPT
387+
? // Setting it to ES5 removes the automatic 'use strict'
388+
'ECMASCRIPT5'
389+
: // TODO: What should the default output format be?
390+
null,
385391
})
386392
),
387393
// HACK to work around the fact that Rollup isn't removing unused, pure-module imports.

0 commit comments

Comments
 (0)