@@ -327,8 +327,8 @@ export function composeBannerFooterConfig(
327327 banner : BannerAndFooter ,
328328 footer : BannerAndFooter ,
329329) : RsbuildConfig {
330- const bannerConfig = pick ( banner , [ 'js' , 'css' ] ) ;
331- const footerConfig = pick ( footer , [ 'js' , 'css' ] ) ;
330+ const bannerConfig = pick ( banner , [ 'js' , 'css' , 'raw' ] ) ;
331+ const footerConfig = pick ( footer , [ 'js' , 'css' , 'raw' ] ) ;
332332
333333 if ( isEmptyObject ( bannerConfig ) && isEmptyObject ( footerConfig ) ) {
334334 return { } ;
@@ -342,7 +342,7 @@ export function composeBannerFooterConfig(
342342 new rspack . BannerPlugin ( {
343343 banner : bannerConfig . js ,
344344 stage : rspack . Compilation . PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE + 1 ,
345- raw : true ,
345+ raw : bannerConfig ?. raw ?? true ,
346346 include : / \. ( j s | m j s | c j s ) $ / ,
347347 } ) ,
348348 ) ;
@@ -352,7 +352,7 @@ export function composeBannerFooterConfig(
352352 new rspack . BannerPlugin ( {
353353 banner : bannerConfig . css ,
354354 stage : rspack . Compilation . PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE + 1 ,
355- raw : true ,
355+ raw : bannerConfig ?. raw ?? true ,
356356 include : / \. ( c s s ) $ / ,
357357 } ) ,
358358 ) ;
@@ -365,7 +365,7 @@ export function composeBannerFooterConfig(
365365 new rspack . BannerPlugin ( {
366366 banner : footerConfig . js ,
367367 stage : rspack . Compilation . PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE + 1 ,
368- raw : true ,
368+ raw : footerConfig ?. raw ?? true ,
369369 footer : true ,
370370 include : / \. ( j s | m j s | c j s ) $ / ,
371371 } ) ,
@@ -376,7 +376,7 @@ export function composeBannerFooterConfig(
376376 new rspack . BannerPlugin ( {
377377 banner : footerConfig . css ,
378378 stage : rspack . Compilation . PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE + 1 ,
379- raw : true ,
379+ raw : footerConfig ?. raw ?? true ,
380380 footer : true ,
381381 include : / \. ( c s s ) $ / ,
382382 } ) ,
@@ -934,8 +934,8 @@ const composeDtsConfig = async (
934934 abortOnError : dts ?. abortOnError ?? true ,
935935 dtsExtension : dts ?. autoExtension ? dtsExtension : '.d.ts' ,
936936 autoExternal,
937- banner : banner ?. dts ,
938- footer : footer ?. dts ,
937+ banner : { content : banner ?. dts , raw : banner ?. raw ?? true } ,
938+ footer : { content : footer ?. dts , raw : footer ?. raw ?? true } ,
939939 } ) ,
940940 ] ,
941941 } ;
0 commit comments