Skip to content

Commit ec8da92

Browse files
authored
ref(build): Move build directory to main rollup config (#4710)
Our bundles directory, `build`, is the same in every package, and therefore should live in the centralized rollup config rather than all of the package-specific ones.
1 parent e788c9e commit ec8da92

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

packages/browser/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const builds = [];
88
isAddOn: false,
99
jsVersion,
1010
licenseTitle: '@sentry/browser',
11-
outputFileBase: `build/bundle${jsVersion === 'es6' ? '.es6' : ''}`,
11+
outputFileBase: `bundle${jsVersion === 'es6' ? '.es6' : ''}`,
1212
});
1313

1414
builds.push(...makeConfigVariants(baseBundleConfig));

packages/integrations/rollup.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ integrationSourceFiles.forEach(file => {
1414
isAddOn: true,
1515
jsVersion: 'es5',
1616
licenseTitle: '@sentry/integrations',
17-
outputFileBase: `build/${file.replace('.ts', '')}`,
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', '')}`,
1820
});
1921

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

packages/tracing/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const builds = [];
88
isAddOn: false,
99
jsVersion,
1010
licenseTitle: '@sentry/tracing & @sentry/browser',
11-
outputFileBase: `build/bundle.tracing${jsVersion === 'es6' ? '.es6' : ''}`,
11+
outputFileBase: `bundle.tracing${jsVersion === 'es6' ? '.es6' : ''}`,
1212
});
1313

1414
builds.push(...makeConfigVariants(baseBundleConfig));

packages/vue/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const baseBundleConfig = makeBaseBundleConfig({
55
isAddOn: false,
66
jsVersion: 'es5',
77
licenseTitle: '@sentry/vue',
8-
outputFileBase: 'build/bundle.vue',
8+
outputFileBase: 'bundle.vue',
99
});
1010

1111
export default makeConfigVariants(baseBundleConfig);

packages/wasm/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const baseBundleConfig = makeBaseBundleConfig({
55
isAddOn: true,
66
jsVersion: 'es5',
77
licenseTitle: '@sentry/wasm',
8-
outputFileBase: 'build/wasm',
8+
outputFileBase: 'wasm',
99
});
1010

1111
export default makeConfigVariants(baseBundleConfig);

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export function makeBaseBundleConfig(options) {
177177
input,
178178
output: {
179179
// a file extension will be added to this base value when we specify either a minified or non-minified build
180-
file: outputFileBase,
180+
file: `build/${outputFileBase}`,
181181
sourcemap: true,
182182
strict: false,
183183
esModule: false,

0 commit comments

Comments
 (0)