Skip to content

Commit f2323d3

Browse files
committed
DROP generate es6 tracing bundle
1 parent f55697e commit f2323d3

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

packages/tracing/rollup.config.js

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
11
import { makeBaseBundleConfig, makeLicensePlugin, terserPlugin } from '../../rollup.config';
22

3+
const builds = [];
4+
35
const licensePlugin = makeLicensePlugin('@sentry/tracing & @sentry/browser');
46

5-
const baseBundleConfig = makeBaseBundleConfig({
6-
input: 'src/index.bundle.ts',
7-
isAddOn: false,
8-
jsVersion: 'es5',
9-
outputFileBase: 'build/bundle.tracing',
7+
['es5', 'es6'].forEach(jsVersion => {
8+
const baseBundleConfig = makeBaseBundleConfig({
9+
input: 'src/index.bundle.ts',
10+
isAddOn: false,
11+
jsVersion,
12+
outputFileBase: `build/bundle.tracing${jsVersion === 'es6' ? '.es6' : ''}`,
13+
});
14+
15+
builds.push(
16+
...[
17+
{
18+
...baseBundleConfig,
19+
output: {
20+
...baseBundleConfig.output,
21+
file: `${baseBundleConfig.output.file}.js`,
22+
},
23+
plugins: [...baseBundleConfig.plugins, licensePlugin],
24+
},
25+
{
26+
...baseBundleConfig,
27+
output: {
28+
...baseBundleConfig.output,
29+
file: `${baseBundleConfig.output.file}.min.js`,
30+
},
31+
plugins: [...baseBundleConfig.plugins, terserPlugin, licensePlugin],
32+
},
33+
],
34+
);
1035
});
1136

12-
export default [
13-
// ES5 Browser Tracing Bundle
14-
{
15-
...baseBundleConfig,
16-
output: {
17-
...baseBundleConfig.output,
18-
file: `${baseBundleConfig.output.file}.js`,
19-
},
20-
plugins: [...baseBundleConfig.plugins, licensePlugin],
21-
},
22-
{
23-
...baseBundleConfig,
24-
output: {
25-
...baseBundleConfig.output,
26-
file: `${baseBundleConfig.output.file}.min.js`,
27-
},
28-
plugins: [...baseBundleConfig.plugins, terserPlugin, licensePlugin],
29-
},
30-
];
37+
export default builds;

0 commit comments

Comments
 (0)