Skip to content

Commit 4d77983

Browse files
authored
chore(build): Update and hoist rollup (#4578)
As prep for the new bundling process, this updates `rollup` to latest and hoists it to the main `package.json`. Other than single-character changes to generated variable names, the only effect this has on the generated bundles is to add `Object.defineProperty(exports, '__esModule', { value: true });` (or its minified counterpart) at the end of each bundle. According to the Rollup docs[1]: > This property signifies that the exported value is the namespace of an ES module and that the default export of this module corresponds to the .default property of the exported object. Since we don't have default exports from our SDKs or integrations, this isn't necessary and just adds dead weight to the bundles. Setting `output.esModule` to `false` in the Rollup config prevents this addition. [1] https://rollupjs.org/guide/en/#outputesmodule
1 parent 0a6e535 commit 4d77983

File tree

12 files changed

+13
-14
lines changed

12 files changed

+13
-14
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"prettier": "2.5.1",
7373
"replace-in-file": "^4.0.0",
7474
"rimraf": "^3.0.2",
75+
"rollup": "^2.67.1",
7576
"rollup-plugin-license": "^2.6.1",
7677
"rollup-plugin-terser": "^7.0.2",
7778
"rollup-plugin-typescript2": "^0.31.2",

packages/browser/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"karma-webkit-launcher": "^1.0.2",
4141
"node-fetch": "^2.6.0",
4242
"playwright": "^1.17.1",
43-
"rollup": "^1.10.1",
4443
"rollup-plugin-commonjs": "^9.3.4",
4544
"rollup-plugin-node-resolve": "^4.2.3",
4645
"sinon": "^7.3.2",

packages/browser/rollup.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const bundleConfig = {
8282
name: 'Sentry',
8383
sourcemap: true,
8484
strict: false,
85+
esModule: false,
8586
},
8687
context: 'window',
8788
plugins: [

packages/integrations/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
},
2424
"devDependencies": {
2525
"chai": "^4.1.2",
26-
"rollup": "^1.10.1",
2726
"rollup-plugin-commonjs": "^9.3.4",
2827
"rollup-plugin-node-resolve": "^4.2.3"
2928
},

packages/integrations/rollup.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ function loadAllIntegrations() {
9595
format: 'cjs',
9696
sourcemap: true,
9797
strict: false,
98+
esModule: false,
9899
},
99100
plugins: build.plugins,
100101
treeshake: 'smallest',

packages/tracing/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"@types/express": "^4.17.1",
2828
"@types/jsdom": "^16.2.3",
2929
"jsdom": "^16.2.2",
30-
"rollup": "^1.10.1",
3130
"rollup-plugin-commonjs": "^9.3.4",
3231
"rollup-plugin-node-resolve": "^4.2.3"
3332
},

packages/tracing/rollup.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const bundleConfig = {
7070
name: 'Sentry',
7171
sourcemap: true,
7272
strict: false,
73+
esModule: false,
7374
},
7475
context: 'window',
7576
plugins: [

packages/vue/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
},
3030
"devDependencies": {
3131
"jsdom": "^16.2.2",
32-
"rollup": "^1.10.1",
3332
"rollup-plugin-commonjs": "^9.3.4",
3433
"rollup-plugin-node-resolve": "^4.2.3"
3534
},

packages/vue/rollup.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const bundleConfig = {
7070
name: 'Sentry',
7171
sourcemap: true,
7272
strict: false,
73+
esModule: false,
7374
},
7475
context: 'window',
7576
plugins: [

packages/wasm/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"express": "^4.17.1",
2828
"jest-puppeteer": "^4.4.0",
2929
"puppeteer": "^5.5.0",
30-
"rollup": "^1.10.1",
3130
"rollup-plugin-commonjs": "^9.3.4",
3231
"rollup-plugin-node-resolve": "^4.2.3"
3332
},

0 commit comments

Comments
 (0)