File tree Expand file tree Collapse file tree 5 files changed +127
-368
lines changed
dev-packages/e2e-tests/test-applications/debug-id-sourcemaps Expand file tree Collapse file tree 5 files changed +127
-368
lines changed Original file line number Diff line number Diff line change 1313 "@sentry/node" : " latest || *"
1414 },
1515 "devDependencies" : {
16- "rollup" : " ^4.24.2 " ,
16+ "rollup" : " ^4.35.0 " ,
1717 "vitest" : " ^0.34.6" ,
1818 "@sentry/rollup-plugin" : " 2.22.6"
1919 },
Original file line number Diff line number Diff line change 126126 "npm-run-all2" : " ^6.2.0" ,
127127 "prettier" : " ^3.1.1" ,
128128 "rimraf" : " ^5.0.10" ,
129- "rollup" : " ^4.24.2 " ,
129+ "rollup" : " ^4.35.0 " ,
130130 "rollup-plugin-cleanup" : " ^3.2.1" ,
131131 "rollup-plugin-license" : " ^3.3.1" ,
132132 "size-limit" : " ~11.1.6" ,
Original file line number Diff line number Diff line change 8888 "@sentry/webpack-plugin" : " 3.2.2" ,
8989 "chalk" : " 3.0.0" ,
9090 "resolve" : " 1.22.8" ,
91- "rollup" : " 4.34.9 " ,
91+ "rollup" : " 4.35.0 " ,
9292 "stacktrace-parser" : " ^0.1.10"
9393 },
9494 "devDependencies" : {
Original file line number Diff line number Diff line change @@ -25,12 +25,17 @@ const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : unde
2525const origGetStaticProps = userPageModule ? userPageModule . getStaticProps : undefined ;
2626const origGetServerSideProps = userPageModule ? userPageModule . getServerSideProps : undefined ;
2727
28+ // Rollup will aggressively tree-shake what it perceives to be unused properties
29+ // on objects. Because the key that's used to index into this object (__ROUTE__)
30+ // is replaced during bundling, Rollup can't see that these properties are in fact
31+ // used. Using `Object.freeze` signals to Rollup that it should not tree-shake
32+ // this object.
2833// eslint-disable-next-line @typescript-eslint/no-explicit-any
29- const getInitialPropsWrappers : Record < string , any > = {
34+ const getInitialPropsWrappers : Record < string , any > = Object . freeze ( {
3035 '/_app' : Sentry . wrapAppGetInitialPropsWithSentry ,
3136 '/_document' : Sentry . wrapDocumentGetInitialPropsWithSentry ,
3237 '/_error' : Sentry . wrapErrorGetInitialPropsWithSentry ,
33- } ;
38+ } ) ;
3439
3540const getInitialPropsWrapper = getInitialPropsWrappers [ '__ROUTE__' ] || Sentry . wrapGetInitialPropsWithSentry ;
3641
You can’t perform that action at this time.
0 commit comments