Skip to content

Commit 02d065d

Browse files
authored
build(cdn): Make integration CDN bundles build in parallel (#7621)
1 parent b589685 commit 02d065d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/integrations/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"scripts": {
2929
"build": "run-p build:transpile build:types build:bundle",
30-
"build:bundle": "ts-node scripts/buildBundles.ts",
30+
"build:bundle": "ts-node scripts/buildBundles.ts --parallel",
3131
"build:dev": "run-p build:transpile build:types",
3232
"build:transpile": "rollup -c rollup.npm.config.js",
3333
"build:types": "tsc -p tsconfig.types.json",

packages/integrations/rollup.bundle.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const baseBundleConfig = makeBaseBundleConfig({
1212
entrypoints: [`src/${file}`],
1313
jsVersion,
1414
licenseTitle: '@sentry/integrations',
15-
outputFileBase: ({ name: entrypoint }) => `bundles/${entrypoint}${jsVersion === 'ES5' ? '.es5' : ''}`,
15+
outputFileBase: ({ name: entrypoint }) => `bundles/${entrypoint}${jsVersion === 'es5' ? '.es5' : ''}`,
1616
});
1717

1818
// TODO We only need `commonjs` for localforage (used in the offline plugin). Once that's fixed, this can come out.

packages/integrations/scripts/buildBundles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async function buildBundle(integration: string, jsVersion: string): Promise<void
3333
if (runParallel) {
3434
// We're building a bundle for each integration and each JavaScript version.
3535
const tasks = getIntegrations().reduce(
36-
(tasks, integration) => [...tasks, buildBundle(integration, 'ES5'), buildBundle(integration, 'ES6')],
36+
(tasks, integration) => [...tasks, buildBundle(integration, 'es5'), buildBundle(integration, 'es6')],
3737
[] as Promise<void>[],
3838
);
3939

@@ -49,8 +49,8 @@ if (runParallel) {
4949
} else {
5050
void (async () => {
5151
for (const integration of getIntegrations()) {
52-
await buildBundle(integration, 'ES5');
53-
await buildBundle(integration, 'ES6');
52+
await buildBundle(integration, 'es5');
53+
await buildBundle(integration, 'es6');
5454
}
5555
// eslint-disable-next-line no-console
5656
console.log('\nIntegration bundles built successfully');

0 commit comments

Comments
 (0)