Skip to content

Commit da28efd

Browse files
committed
get js version from env variable
1 parent 57a8997 commit da28efd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/integrations/rollup.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ import { insertAt, makeBaseBundleConfig, makeConfigVariants } from '../../rollup
55
const builds = [];
66

77
const file = process.env.INTEGRATION_FILE;
8+
const jsVersion = process.env.JS_VERSION;
89

910
const baseBundleConfig = makeBaseBundleConfig({
1011
input: `src/${file}`,
1112
isAddOn: true,
12-
jsVersion: 'es5',
13+
jsVersion,
1314
licenseTitle: '@sentry/integrations',
14-
// TODO this doesn't currently need to be a template string, but soon will need to be, so leaving it in that form
15-
// for now
16-
outputFileBase: `${file.replace('.ts', '')}`,
15+
outputFileBase: `${file.replace('.ts', '')}${jsVersion === 'ES6' ? '.es6' : ''}`,
1716
});
1817

1918
// TODO We only need `commonjs` for localforage (used in the offline plugin). Once that's fixed, this can come out.
2019
baseBundleConfig.plugins = insertAt(baseBundleConfig.plugins, -2, commonjs());
2120

21+
// this makes non-minified, minified, and minified-with-debug-logging versions of each bundle
2222
builds.push(...makeConfigVariants(baseBundleConfig));
2323

2424
export default builds;

0 commit comments

Comments
 (0)