Skip to content

Commit b56c577

Browse files
authored
fix(integrations): Emit ES5 code in ES5 bundles (#4769)
In #4718, a change was made to use an environment variable to control the version of JS emitted when building integration bundles. Unfortunately, the values then given to that variable were uppercase, whereas our code assumes a lowercase version. Further, the default output is ES6 (in preparation for going ES6-first in v7), so when the version flag `ES5` doesn't match the checked-for `es5`, we emit ES6 in the supposedly-ES5 bundle. This controls for casing by casting the value to lowercase before comparison. Fixes #4768.
1 parent 59a0cb6 commit b56c577

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rollup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export function makeBaseBundleConfig(options) {
190190
esModule: false,
191191
},
192192
plugins: [
193-
jsVersion === 'es5' ? typescriptPluginES5 : typescriptPluginES6,
193+
jsVersion.toLowerCase() === 'es5' ? typescriptPluginES5 : typescriptPluginES6,
194194
markAsBrowserBuildPlugin,
195195
nodeResolvePlugin,
196196
licensePlugin,

0 commit comments

Comments
 (0)