File tree 5 files changed +128
-214
lines changed
5 files changed +128
-214
lines changed Original file line number Diff line number Diff line change 74
74
" simple-git-hooks"
75
75
],
76
76
"overrides" : {
77
+ "@rspack/core" : " 1.2.0-alpha.0" ,
77
78
"zx>@types/node" : " -"
78
79
}
79
80
}
Original file line number Diff line number Diff line change @@ -473,7 +473,11 @@ export async function createConstantRsbuildConfig(): Promise<EnvironmentConfig>
473
473
moduleIds : 'named' ,
474
474
nodeEnv : false ,
475
475
} ,
476
+ cache : true ,
476
477
experiments : {
478
+ cache : {
479
+ type : 'persistent' ,
480
+ } ,
477
481
rspackFuture : {
478
482
bundlerInfo : {
479
483
force : false ,
@@ -1616,7 +1620,20 @@ export async function composeRsbuildEnvironments(
1616
1620
1617
1621
for ( const { format, id, config } of rsbuildConfigWithLibInfo ) {
1618
1622
const libId = typeof id === 'string' ? id : composeDefaultId ( format ) ;
1619
- environments [ libId ] = config ;
1623
+ environments [ libId ] = mergeRsbuildConfig ( config , {
1624
+ tools : {
1625
+ rspack : {
1626
+ experiments : {
1627
+ cache : {
1628
+ version :
1629
+ libId +
1630
+ config . source ?. entry ?. index +
1631
+ config . output ?. distPath ?. root ,
1632
+ } ,
1633
+ } ,
1634
+ } ,
1635
+ } ,
1636
+ } as EnvironmentConfig ) ;
1620
1637
environmentWithInfos . push ( { id : libId , format, config } ) ;
1621
1638
}
1622
1639
Original file line number Diff line number Diff line change @@ -140,7 +140,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
140
140
" htmlPlugin" : false ,
141
141
" rspack" : [
142
142
{
143
+ " cache" : true ,
143
144
" experiments" : {
145
+ " cache" : {
146
+ " type" : " persistent" ,
147
+ },
144
148
" rspackFuture" : {
145
149
" bundlerInfo" : {
146
150
" force" : false ,
@@ -395,7 +399,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
395
399
" htmlPlugin" : false ,
396
400
" rspack" : [
397
401
{
402
+ " cache" : true ,
398
403
" experiments" : {
404
+ " cache" : {
405
+ " type" : " persistent" ,
406
+ },
399
407
" rspackFuture" : {
400
408
" bundlerInfo" : {
401
409
" force" : false ,
@@ -621,7 +629,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
621
629
" htmlPlugin" : false ,
622
630
" rspack" : [
623
631
{
632
+ " cache" : true ,
624
633
" experiments" : {
634
+ " cache" : {
635
+ " type" : " persistent" ,
636
+ },
625
637
" rspackFuture" : {
626
638
" bundlerInfo" : {
627
639
" force" : false ,
@@ -794,7 +806,11 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
794
806
" htmlPlugin" : false ,
795
807
" rspack" : [
796
808
{
809
+ " cache" : true ,
797
810
" experiments" : {
811
+ " cache" : {
812
+ " type" : " persistent" ,
813
+ },
798
814
" rspackFuture" : {
799
815
" bundlerInfo" : {
800
816
" force" : false ,
You can’t perform that action at this time.
0 commit comments