Skip to content

Commit e575196

Browse files
committed
move paths to main config
1 parent 37c308f commit e575196

File tree

6 files changed

+16
-44
lines changed

6 files changed

+16
-44
lines changed

packages/browser/rollup.config.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import typescript from 'rollup-plugin-typescript2';
33
import resolve from '@rollup/plugin-node-resolve';
44
import replace from '@rollup/plugin-replace';
55

6-
import { makeLicensePlugin } from '../../rollup.config';
6+
import { makeLicensePlugin, paths } from '../../rollup.config';
77

88
const licensePlugin = makeLicensePlugin();
99

@@ -36,14 +36,6 @@ const terserInstance = terser({
3636
},
3737
});
3838

39-
const paths = {
40-
'@sentry/utils': ['../utils/src'],
41-
'@sentry/core': ['../core/src'],
42-
'@sentry/hub': ['../hub/src'],
43-
'@sentry/types': ['../types/src'],
44-
'@sentry/minimal': ['../minimal/src'],
45-
};
46-
4739
const plugins = [
4840
typescript({
4941
tsconfig: 'tsconfig.esm.json',

packages/integrations/rollup.config.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import resolve from '@rollup/plugin-node-resolve';
66
import commonjs from '@rollup/plugin-commonjs';
77
import replace from '@rollup/plugin-replace';
88

9+
import { paths } from '../../rollup.config';
10+
911
const terserInstance = terser({
1012
mangle: {
1113
// captureExceptions and captureMessage are public API methods and they don't need to be listed here
@@ -27,13 +29,7 @@ const plugins = [
2729
compilerOptions: {
2830
declaration: false,
2931
declarationMap: false,
30-
paths: {
31-
'@sentry/utils': ['../utils/src'],
32-
'@sentry/core': ['../core/src'],
33-
'@sentry/hub': ['../hub/src'],
34-
'@sentry/types': ['../types/src'],
35-
'@sentry/minimal': ['../minimal/src'],
36-
},
32+
paths,
3733
baseUrl: '.',
3834
},
3935
},

packages/tracing/rollup.config.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,10 @@ import typescript from 'rollup-plugin-typescript2';
22
import resolve from '@rollup/plugin-node-resolve';
33
import replace from '@rollup/plugin-replace';
44

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

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

9-
const paths = {
10-
'@sentry/utils': ['../utils/src'],
11-
'@sentry/core': ['../core/src'],
12-
'@sentry/hub': ['../hub/src'],
13-
'@sentry/types': ['../types/src'],
14-
'@sentry/minimal': ['../minimal/src'],
15-
'@sentry/browser': ['../browser/src'],
16-
};
17-
189
const plugins = [
1910
typescript({
2011
tsconfig: 'tsconfig.esm.json',

packages/vue/rollup.config.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,10 @@ import typescript from 'rollup-plugin-typescript2';
22
import resolve from '@rollup/plugin-node-resolve';
33
import replace from '@rollup/plugin-replace';
44

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

77
const licensePlugin = makeLicensePlugin();
88

9-
const paths = {
10-
'@sentry/utils': ['../utils/src'],
11-
'@sentry/core': ['../core/src'],
12-
'@sentry/hub': ['../hub/src'],
13-
'@sentry/types': ['../types/src'],
14-
'@sentry/minimal': ['../minimal/src'],
15-
'@sentry/browser': ['../browser/src'],
16-
};
17-
189
const plugins = [
1910
typescript({
2011
tsconfig: 'tsconfig.esm.json',

packages/wasm/rollup.config.js

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

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

77
const plugins = [
88
typescript({
@@ -11,13 +11,7 @@ const plugins = [
1111
compilerOptions: {
1212
declaration: false,
1313
declarationMap: false,
14-
paths: {
15-
'@sentry/utils': ['../utils/src'],
16-
'@sentry/core': ['../core/src'],
17-
'@sentry/hub': ['../hub/src'],
18-
'@sentry/types': ['../types/src'],
19-
'@sentry/minimal': ['../minimal/src'],
20-
},
14+
paths,
2115
baseUrl: '.',
2216
},
2317
},

rollup.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
import license from 'rollup-plugin-license';
66
import { terser } from 'rollup-plugin-terser';
77

8+
export const paths = {
9+
'@sentry/browser': ['../browser/src'],
10+
'@sentry/core': ['../core/src'],
11+
'@sentry/hub': ['../hub/src'],
12+
'@sentry/minimal': ['../minimal/src'],
13+
'@sentry/types': ['../types/src'],
14+
'@sentry/utils': ['../utils/src'],
15+
};
816

917
/**
1018
* Create a plugin to add an identification banner to the top of stand-alone bundles.

0 commit comments

Comments
 (0)