File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11import { getCurrentHub , initAndBind , Integrations as CoreIntegrations } from '@sentry/core' ;
22import { getMainCarrier , setHubOnCarrier } from '@sentry/hub' ;
33import { Integration } from '@sentry/types' ;
4- import { getGlobalObject } from '@sentry/utils' ;
4+ import { dynamicRequire , getGlobalObject } from '@sentry/utils' ;
55import * as domain from 'domain' ;
66import { cwd } from 'process' ;
77import * as readPkgUp from 'read-pkg-up' ;
@@ -142,7 +142,7 @@ function discoverIntegrations(): Integration[] {
142142 return / ^ @ s e n t r y \/ i n t e g r a t i o n - ( c o m m o n | n o d e ) - [ a - z ] / . test ( name ) ;
143143 } )
144144 . map ( name => {
145- const mod = require ( require . resolve ( name , { paths : [ cwd ( ) ] } ) ) ;
145+ const mod = dynamicRequire ( module , require . resolve ( name , { paths : [ cwd ( ) ] } ) ) ;
146146 return Object . values ( mod ) as { new ( ) : Integration } [ ] ;
147147 } )
148148 . reduce ( ( acc , integrations ) => {
You can’t perform that action at this time.
0 commit comments