File tree Expand file tree Collapse file tree 1 file changed +6
-19
lines changed
packages/rspack-plugin/src/rspack-bundle-analysis Expand file tree Collapse file tree 1 file changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -80,25 +80,12 @@ class RspackBundleAnalysisPlugin {
8080 async ( ) => {
8181 this . output . setBundleName ( this . output . originalBundleName ) ;
8282
83+ // Removed automatic suffix addition to match webpack plugin behavior
84+ // This ensures the bundle name matches what users configure in Codecov settings
85+ // Previously, this was adding -cjs or -esm suffixes which caused platform recognition issues
86+ //
8387 // Rspack base chunk format options: https://rspack.dev/config/output/#outputchunkformat
84- if ( typeof compilation . outputOptions . chunkFormat === "string" ) {
85- if ( compilation . name && compilation . name !== "" ) {
86- this . output . setBundleName (
87- `${ this . output . bundleName } -${ compilation . name } ` ,
88- ) ;
89- }
90-
91- let chunkFormat = compilation . outputOptions . chunkFormat ;
92- if ( chunkFormat === "commonjs" ) {
93- chunkFormat = "cjs" ;
94- } else if ( chunkFormat === "module" ) {
95- chunkFormat = "esm" ;
96- }
97-
98- this . output . setBundleName (
99- `${ this . output . bundleName } -${ chunkFormat } ` ,
100- ) ;
101- }
88+
10289
10390 const compilationStats = compilation . getStats ( ) . toJson ( {
10491 assets : true ,
@@ -109,7 +96,7 @@ class RspackBundleAnalysisPlugin {
10996 } ) ;
11097
11198 this . output . bundler = {
112- name : "rspack" ,
99+ name : "webpack" , // Use "webpack" for Codecov platform compatibility
113100 version : rspack . version ,
114101 } ;
115102
You can’t perform that action at this time.
0 commit comments