Skip to content

Commit 7b95357

Browse files
committed
make rollup only build one integration at at time
1 parent ec8da92 commit 7b95357

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
1-
import * as fs from 'fs';
2-
31
import commonjs from '@rollup/plugin-commonjs';
42

53
import { insertAt, makeBaseBundleConfig, makeConfigVariants } from '../../rollup.config';
64

75
const builds = [];
86

9-
const integrationSourceFiles = fs.readdirSync('./src').filter(file => file != 'index.ts');
7+
const file = process.env.INTEGRATION_FILE;
108

11-
integrationSourceFiles.forEach(file => {
12-
const baseBundleConfig = makeBaseBundleConfig({
13-
input: `src/${file}`,
14-
isAddOn: true,
15-
jsVersion: 'es5',
16-
licenseTitle: '@sentry/integrations',
17-
// TODO this doesn't currently need to be a template string, but soon will need to be, so leaving it in that form
18-
// for now
19-
outputFileBase: `${file.replace('.ts', '')}`,
20-
});
9+
const baseBundleConfig = makeBaseBundleConfig({
10+
input: `src/${file}`,
11+
isAddOn: true,
12+
jsVersion: 'es5',
13+
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', '')}`,
17+
});
2118

22-
// TODO We only need `commonjs` for localforage (used in the offline plugin). Once that's fixed, this can come out.
23-
baseBundleConfig.plugins = insertAt(baseBundleConfig.plugins, -2, commonjs());
19+
// TODO We only need `commonjs` for localforage (used in the offline plugin). Once that's fixed, this can come out.
20+
baseBundleConfig.plugins = insertAt(baseBundleConfig.plugins, -2, commonjs());
2421

25-
builds.push(...makeConfigVariants(baseBundleConfig));
26-
});
22+
builds.push(...makeConfigVariants(baseBundleConfig));
2723

2824
export default builds;

0 commit comments

Comments
 (0)