Skip to content

Commit 5a3a1bc

Browse files
committed
make rollup only build one integration at at time
1 parent af7081c commit 5a3a1bc

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed
Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
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-
outputFileBase: `build/${file.replace('.ts', '')}`,
18-
});
9+
const baseBundleConfig = makeBaseBundleConfig({
10+
input: `src/${file}`,
11+
isAddOn: true,
12+
jsVersion: 'es5',
13+
licenseTitle: '@sentry/integrations',
14+
outputFileBase: `build/${file.replace('.ts', '')}`,
15+
});
1916

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

23-
builds.push(...makeConfigVariants(baseBundleConfig));
24-
});
20+
builds.push(...makeConfigVariants(baseBundleConfig));
2521

2622
export default builds;

0 commit comments

Comments
 (0)