@@ -315,7 +315,7 @@ const unplugin = createUnplugin<Options>((options, unpluginMetaContext) => {
315315 nodir : true ,
316316 ignore : internalOptions . _experiments . debugIdUpload . ignore ,
317317 } )
318- ) . filter ( ( p ) => p . endsWith ( ".js" ) || p . endsWith ( ".mjs" ) ) ;
318+ ) . filter ( ( p ) => p . endsWith ( ".js" ) || p . endsWith ( ".mjs" ) || p . endsWith ( ".cjs" ) ) ;
319319
320320 const sourceFileUploadFolderPromise = util . promisify ( fs . mkdtemp ) (
321321 path . join ( os . tmpdir ( ) , "sentry-bundler-plugin-upload-" )
@@ -373,7 +373,7 @@ const unplugin = createUnplugin<Options>((options, unpluginMetaContext) => {
373373 renderChunk ( code , chunk ) {
374374 if (
375375 options . _experiments ?. debugIdUpload &&
376- [ ".js" , ".mjs" ] . some ( ( ending ) => chunk . fileName . endsWith ( ending ) ) // chunks could be any file (html, md, ...)
376+ [ ".js" , ".mjs" , ".cjs" ] . some ( ( ending ) => chunk . fileName . endsWith ( ending ) ) // chunks could be any file (html, md, ...)
377377 ) {
378378 return injectDebugIdSnippetIntoChunk ( code ) ;
379379 } else {
@@ -385,7 +385,7 @@ const unplugin = createUnplugin<Options>((options, unpluginMetaContext) => {
385385 renderChunk ( code , chunk ) {
386386 if (
387387 options . _experiments ?. debugIdUpload &&
388- [ ".js" , ".mjs" ] . some ( ( ending ) => chunk . fileName . endsWith ( ending ) ) // chunks could be any file (html, md, ...)
388+ [ ".js" , ".mjs" , ".cjs" ] . some ( ( ending ) => chunk . fileName . endsWith ( ending ) ) // chunks could be any file (html, md, ...)
389389 ) {
390390 return injectDebugIdSnippetIntoChunk ( code ) ;
391391 } else {
0 commit comments