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
},

packages/wasm/rollup.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ function loadAllIntegrations() {
8888
format: 'cjs',
8989
sourcemap: true,
9090
strict: false,
91+
esModule: false,
9192
},
9293
plugins: build.plugins,
9394
treeshake: 'smallest',

yarn.lock

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11231,7 +11231,7 @@ fsevents@^1.2.7:
1123111231
bindings "^1.5.0"
1123211232
nan "^2.12.1"
1123311233

11234-
fsevents@~2.3.1:
11234+
fsevents@~2.3.1, fsevents@~2.3.2:
1123511235
version "2.3.2"
1123611236
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
1123711237
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
@@ -18972,14 +18972,12 @@ rollup-pluginutils@^2.6.0:
1897218972
dependencies:
1897318973
estree-walker "^0.6.1"
1897418974

18975-
rollup@^1.10.1:
18976-
version "1.32.1"
18977-
resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.32.1.tgz#4480e52d9d9e2ae4b46ba0d9ddeaf3163940f9c4"
18978-
integrity sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==
18979-
dependencies:
18980-
"@types/estree" "*"
18981-
"@types/node" "*"
18982-
acorn "^7.1.0"
18975+
rollup@^2.67.1:
18976+
version "2.67.1"
18977+
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.67.1.tgz#4402665706fa00f321d446ce45f880e02cf54f01"
18978+
integrity sha512-1Sbcs4OuW+aD+hhqpIRl+RqooIpF6uQcfzU/QSI7vGkwADY6cM4iLsBGRM2CGLXDTDN5y/yShohFmnKegSPWzg==
18979+
optionalDependencies:
18980+
fsevents "~2.3.2"
1898318981

1898418982
rsvp@^3.0.14, rsvp@^3.0.17, rsvp@^3.0.18, rsvp@^3.0.21, rsvp@^3.0.6, rsvp@^3.1.0:
1898518983
version "3.6.2"

0 commit comments

Comments
 (0)