Skip to content

Commit bc6dcb5

Browse files
committed
pull common output options into central config
1 parent 56b0cf0 commit bc6dcb5

File tree

6 files changed

+18
-20
lines changed

6 files changed

+18
-20
lines changed

packages/browser/rollup.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { terser } from 'rollup-plugin-terser';
22
import typescript from 'rollup-plugin-typescript2';
33
import resolve from '@rollup/plugin-node-resolve';
44

5-
import { makeLicensePlugin, markAsBrowserBuild, paths } from '../../rollup.config';
5+
import { baseBundleConfig, makeLicensePlugin, markAsBrowserBuild, paths } from '../../rollup.config';
66

77
const licensePlugin = makeLicensePlugin();
88

@@ -58,11 +58,9 @@ const plugins = [
5858
const bundleConfig = {
5959
input: 'src/index.ts',
6060
output: {
61+
...baseBundleConfig.output,
6162
format: 'iife',
6263
name: 'Sentry',
63-
sourcemap: true,
64-
strict: false,
65-
esModule: false,
6664
},
6765
context: 'window',
6866
plugins: [...plugins, licensePlugin],

packages/integrations/rollup.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import typescript from 'rollup-plugin-typescript2';
55
import resolve from '@rollup/plugin-node-resolve';
66
import commonjs from '@rollup/plugin-commonjs';
77

8-
import { markAsBrowserBuild, paths } from '../../rollup.config';
8+
import { baseBundleConfig, markAsBrowserBuild, paths } from '../../rollup.config';
99

1010
const terserInstance = terser({
1111
mangle: {
@@ -78,11 +78,9 @@ function loadAllIntegrations() {
7878
intro: 'var exports = {};',
7979
outro: mergeIntoSentry(),
8080
footer: '}(window));',
81+
...baseBundleConfig.output,
8182
file: `build/${file.replace('.ts', build.extension)}`,
8283
format: 'cjs',
83-
sourcemap: true,
84-
strict: false,
85-
esModule: false,
8684
},
8785
plugins: build.plugins,
8886
treeshake: 'smallest',

packages/tracing/rollup.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import typescript from 'rollup-plugin-typescript2';
22
import resolve from '@rollup/plugin-node-resolve';
33

4-
import { makeLicensePlugin, markAsBrowserBuild, paths, terserPlugin } from '../../rollup.config';
4+
import { baseBundleConfig, makeLicensePlugin, markAsBrowserBuild, paths, terserPlugin } from '../../rollup.config';
55

66
const licensePlugin = makeLicensePlugin('@sentry/tracing & @sentry/browser');
77

@@ -28,11 +28,9 @@ const plugins = [
2828
const bundleConfig = {
2929
input: 'src/index.ts',
3030
output: {
31+
...baseBundleConfig.output,
3132
format: 'iife',
3233
name: 'Sentry',
33-
sourcemap: true,
34-
strict: false,
35-
esModule: false,
3634
},
3735
context: 'window',
3836
plugins: [...plugins, licensePlugin],

packages/vue/rollup.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import typescript from 'rollup-plugin-typescript2';
22
import resolve from '@rollup/plugin-node-resolve';
33

4-
import { makeLicensePlugin, markAsBrowserBuild, paths, terserPlugin } from '../../rollup.config';
4+
import { baseBundleConfig, makeLicensePlugin, markAsBrowserBuild, paths, terserPlugin } from '../../rollup.config';
55

66
const licensePlugin = makeLicensePlugin();
77

@@ -28,11 +28,9 @@ const plugins = [
2828
const bundleConfig = {
2929
input: 'src/index.ts',
3030
output: {
31+
...baseBundleConfig.output,
3132
format: 'iife',
3233
name: 'Sentry',
33-
sourcemap: true,
34-
strict: false,
35-
esModule: false,
3634
},
3735
context: 'window',
3836
plugins: [...plugins, licensePlugin],

packages/wasm/rollup.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import typescript from 'rollup-plugin-typescript2';
22
import resolve from '@rollup/plugin-node-resolve';
33

4-
import { paths, markAsBrowserBuild, terserPlugin } from '../../rollup.config';
4+
import { baseBundleConfig, paths, markAsBrowserBuild, terserPlugin } from '../../rollup.config';
55

66
const plugins = [
77
typescript({
@@ -54,11 +54,9 @@ function loadAllIntegrations() {
5454
intro: 'var exports = {};',
5555
outro: mergeIntoSentry(),
5656
footer: '}(window));',
57+
...baseBundleConfig.output,
5758
file: `build/wasm${build.extension}`,
5859
format: 'cjs',
59-
sourcemap: true,
60-
strict: false,
61-
esModule: false,
6260
},
6361
plugins: build.plugins,
6462
treeshake: 'smallest',

rollup.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,11 @@ export const markAsBrowserBuild = replace({
5858
__SENTRY_BROWSER_BUNDLE__: true,
5959
},
6060
});
61+
62+
export const baseBundleConfig = {
63+
output: {
64+
sourcemap: true,
65+
strict: false,
66+
esModule: false,
67+
},
68+
};

0 commit comments

Comments
 (0)