File tree Expand file tree Collapse file tree
dev-packages/rollup-utils
server-utils/src/orchestrion/bundler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ export function makeBaseNPMConfig(options = {}) {
9494 // (We don't need it, so why waste the bytes?)
9595 freeze : false ,
9696
97- interop : 'esModule ' ,
97+ interop : 'auto ' ,
9898 } ,
9999
100100 treeshake : {
Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ export function constructWebpackConfigFunction({
433433
434434 // Orchestrion code-transform loader — Node server runtime only, never the edge compilation
435435 if ( runtime === 'server' && userSentryOptions . _experimental ?. useDiagnosticsChannelInjection ) {
436- newConfig . plugins . push ( sentryOrchestrionWebpackPlugin ( ) as WebpackPluginInstance ) ;
436+ newConfig . plugins . push ( sentryOrchestrionWebpackPlugin ( ) as unknown as WebpackPluginInstance ) ;
437437 }
438438
439439 return newConfig ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { createRequire } from 'node:module';
55import { dirname } from 'node:path' ;
66import type { InstrumentationConfig } from '@apm-js-collab/code-transformer' ;
77import { SENTRY_INSTRUMENTATIONS } from '../config' ;
8+ import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/webpack' ;
89
910// Both branches use `createRequire` (never alias the CJS `require`) so bundlers consuming this
1011// module don't emit a "Critical dependency" warning.
@@ -46,10 +47,6 @@ export function getSentryInstrumentations(): InstrumentationConfig[] {
4647 * does NOT inject the `__SENTRY_ORCHESTRION__.bundler` marker — that would disable the runtime
4748 * module hook, which externalized packages still need (hybrid setup).
4849 */
49- export function sentryOrchestrionWebpackPlugin ( ) : unknown {
50- const mod = getOrchestrionRequire ( ) ( '@apm-js-collab/code-transformer-bundler-plugins/webpack' ) as {
51- default ?: ( options : { instrumentations : InstrumentationConfig [ ] } ) => unknown ;
52- } ;
53- const codeTransformerWebpack = mod . default ?? ( mod as unknown as NonNullable < typeof mod . default > ) ;
54- return codeTransformerWebpack ( { instrumentations : SENTRY_INSTRUMENTATIONS } ) ;
50+ export function sentryOrchestrionWebpackPlugin ( ) : ReturnType < typeof codeTransformer > {
51+ return codeTransformer ( { instrumentations : SENTRY_INSTRUMENTATIONS } ) ;
5552}
You can’t perform that action at this time.
0 commit comments