@@ -405,11 +405,27 @@ const prodConfig = ({ mode, env, analysis }) => {
405405 } ,
406406 } ) ;
407407
408+ /** @type { () => (import('@rspack/core').Configuration) } */
409+ const commonForNoRHC = ( ) => ( {
410+ plugins : [
411+ new rspack . IgnorePlugin ( {
412+ resourceRegExp : / ^ @ s t r i p e \/ s t r i p e - j s $ / ,
413+ } ) ,
414+ new rspack . optimize . LimitChunkCountPlugin ( {
415+ maxChunks : 1 ,
416+ } ) ,
417+ ] ,
418+ optimization : {
419+ splitChunks : false ,
420+ } ,
421+ } ) ;
422+
408423 const clerkEsmNoRHC = merge (
409424 entryForVariant ( variants . clerkNoRHC ) ,
410425 common ( { mode, disableRHC : true } ) ,
411426 commonForProd ( ) ,
412427 commonForProdBundled ( ) ,
428+ commonForNoRHC ( ) ,
413429 {
414430 experiments : {
415431 outputModule : true ,
@@ -418,17 +434,6 @@ const prodConfig = ({ mode, env, analysis }) => {
418434 filename : '[name].mjs' ,
419435 libraryTarget : 'module' ,
420436 } ,
421- plugins : [
422- // Include the lazy chunks in the bundle as well
423- // so that the final bundle can be imported and bundled again
424- // by a different bundler, eg the webpack instance used by react-scripts
425- new rspack . optimize . LimitChunkCountPlugin ( {
426- maxChunks : 1 ,
427- } ) ,
428- ] ,
429- optimization : {
430- splitChunks : false ,
431- } ,
432437 } ,
433438 ) ;
434439
@@ -437,22 +442,12 @@ const prodConfig = ({ mode, env, analysis }) => {
437442 common ( { mode, disableRHC : true } ) ,
438443 commonForProd ( ) ,
439444 commonForProdBundled ( ) ,
445+ commonForNoRHC ( ) ,
440446 {
441447 output : {
442448 filename : '[name].js' ,
443449 libraryTarget : 'commonjs' ,
444450 } ,
445- plugins : [
446- // Include the lazy chunks in the bundle as well
447- // so that the final bundle can be imported and bundled again
448- // by a different bundler, eg the webpack instance used by react-scripts
449- new rspack . optimize . LimitChunkCountPlugin ( {
450- maxChunks : 1 ,
451- } ) ,
452- ] ,
453- optimization : {
454- splitChunks : false ,
455- } ,
456451 } ,
457452 ) ;
458453
0 commit comments