File tree Expand file tree Collapse file tree
packages/react-router/src/vite Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import type { AutoInstrumentRSCOptions } from './types';
66
77import t = recast . types . namedTypes ;
88
9+ type AutoInstrumentRSCPluginOptions = AutoInstrumentRSCOptions & { debug ?: boolean } ;
10+
911const JS_EXTENSIONS_RE = / \. ( t s | t s x | j s | j s x | m j s | m t s ) $ / ;
1012const JS_IDENTIFIER_RE = / ^ [ a - z A - Z _ $ ] [ a - z A - Z 0 - 9 _ $ ] * $ / ;
1113const WRAPPED_MODULE_SUFFIX = '?sentry-rsc-wrap' ;
@@ -227,7 +229,7 @@ export function getServerFunctionWrapperCode(
227229}
228230
229231/** @experimental May change in minor releases. */
230- export function makeAutoInstrumentRSCPlugin ( options : AutoInstrumentRSCOptions = { } ) : Plugin {
232+ export function makeAutoInstrumentRSCPlugin ( options : AutoInstrumentRSCPluginOptions = { } ) : Plugin {
231233 const { enabled = true , debug = false } = options ;
232234
233235 let rscDetected = false ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export async function sentryReactRouter(
2121 plugins . push ( makeConfigInjectorPlugin ( options ) ) ;
2222
2323 if ( options . experimental_rscAutoInstrumentation ?. enabled === true ) {
24- plugins . push ( makeAutoInstrumentRSCPlugin ( options . experimental_rscAutoInstrumentation ) ) ;
24+ plugins . push ( makeAutoInstrumentRSCPlugin ( { ... options . experimental_rscAutoInstrumentation , debug : options . debug } ) ) ;
2525 }
2626
2727 if ( process . env . NODE_ENV !== 'development' && viteConfig . command === 'build' && viteConfig . mode !== 'development' ) {
Original file line number Diff line number Diff line change @@ -94,10 +94,4 @@ export type AutoInstrumentRSCOptions = {
9494 * @default false
9595 */
9696 enabled ?: boolean ;
97-
98- /**
99- * Enable debug logging to see which files are being instrumented.
100- * @default false
101- */
102- debug ?: boolean ;
10397} ;
You can’t perform that action at this time.
0 commit comments