@@ -231,6 +231,10 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
231231 name: ' rsbuild:progress' ,
232232 setup() {}
233233 },
234+ {
235+ name: ' rsbuild:worker' ,
236+ setup() {}
237+ },
234238 {
235239 name: ' rsbuild:swc' ,
236240 setup() {}
@@ -613,6 +617,17 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
613617 / \\ . (?:ts| tsx| jsx| mts| cts)$ /
614618 ],
615619 oneOf: [
620+ /* config.module.rule('js').oneOf('js-worker') */
621+ {
622+ resourceQuery: / [?&] worker(?:&| =| $ )/ ,
623+ type: ' javascript/auto' ,
624+ use: [
625+ /* config.module.rule('js').oneOf('js-worker').use('worker-query') */
626+ {
627+ loader: ' <PNPM_INNER>/@rsbuild/core/dist/workerLoader.mjs'
628+ }
629+ ]
630+ },
616631 /* config.module.rule('js').oneOf('js-raw') */
617632 {
618633 resourceQuery: / [?&] raw(?:&| =| $ )/ ,
@@ -1007,6 +1022,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
10071022 MODE: ' "production"' ,
10081023 DEV: false ,
10091024 PROD: true ,
1025+ SSR: true ,
10101026 BASE_URL: ' "/"' ,
10111027 ASSET_PREFIX: ' "auto"'
10121028 },
@@ -1367,6 +1383,17 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
13671383 / \\ . (?:ts| tsx| jsx| mts| cts)$ /
13681384 ],
13691385 oneOf: [
1386+ /* config.module.rule('js').oneOf('js-worker') */
1387+ {
1388+ resourceQuery: / [?&] worker(?:&| =| $ )/ ,
1389+ type: ' javascript/auto' ,
1390+ use: [
1391+ /* config.module.rule('js').oneOf('js-worker').use('worker-query') */
1392+ {
1393+ loader: ' <PNPM_INNER>/@rsbuild/core/dist/workerLoader.mjs'
1394+ }
1395+ ]
1396+ },
13701397 /* config.module.rule('js').oneOf('js-raw') */
13711398 {
13721399 resourceQuery: / [?&] raw(?:&| =| $ )/ ,
@@ -1757,6 +1784,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
17571784 MODE: ' "production"' ,
17581785 DEV: false ,
17591786 PROD: true ,
1787+ SSR: true ,
17601788 BASE_URL: ' "/"' ,
17611789 ASSET_PREFIX: ' "auto"'
17621790 },
@@ -2103,6 +2131,17 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
21032131 / \\ . (?:ts| tsx| jsx| mts| cts)$ /
21042132 ],
21052133 oneOf: [
2134+ /* config.module.rule('js').oneOf('js-worker') */
2135+ {
2136+ resourceQuery: / [?&] worker(?:&| =| $ )/ ,
2137+ type: ' javascript/auto' ,
2138+ use: [
2139+ /* config.module.rule('js').oneOf('js-worker').use('worker-query') */
2140+ {
2141+ loader: ' <PNPM_INNER>/@rsbuild/core/dist/workerLoader.mjs'
2142+ }
2143+ ]
2144+ },
21062145 /* config.module.rule('js').oneOf('js-raw') */
21072146 {
21082147 resourceQuery: / [?&] raw(?:&| =| $ )/ ,
@@ -2418,6 +2457,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
24182457 MODE: ' "production"' ,
24192458 DEV: false ,
24202459 PROD: true ,
2460+ SSR: true ,
24212461 BASE_URL: ' "/"' ,
24222462 ASSET_PREFIX: ' ""'
24232463 },
@@ -2763,6 +2803,17 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
27632803 / \\ . (?:ts| tsx| jsx| mts| cts)$ /
27642804 ],
27652805 oneOf: [
2806+ /* config.module.rule('js').oneOf('js-worker') */
2807+ {
2808+ resourceQuery: / [?&] worker(?:&| =| $ )/ ,
2809+ type: ' javascript/auto' ,
2810+ use: [
2811+ /* config.module.rule('js').oneOf('js-worker').use('worker-query') */
2812+ {
2813+ loader: ' <PNPM_INNER>/@rsbuild/core/dist/workerLoader.mjs'
2814+ }
2815+ ]
2816+ },
27662817 /* config.module.rule('js').oneOf('js-raw') */
27672818 {
27682819 resourceQuery: / [?&] raw(?:&| =| $ )/ ,
@@ -3079,6 +3130,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
30793130 MODE: ' "production"' ,
30803131 DEV: false ,
30813132 PROD: true ,
3133+ SSR: true ,
30823134 BASE_URL: ' "/"' ,
30833135 ASSET_PREFIX: ' ""'
30843136 },
@@ -3372,6 +3424,17 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
33723424 / @module-federation[\\\\ /] /
33733425 ],
33743426 oneOf: [
3427+ /* config.module.rule('js').oneOf('js-worker') */
3428+ {
3429+ resourceQuery: / [?&] worker(?:&| =| $ )/ ,
3430+ type: ' javascript/auto' ,
3431+ use: [
3432+ /* config.module.rule('js').oneOf('js-worker').use('worker-query') */
3433+ {
3434+ loader: ' <PNPM_INNER>/@rsbuild/core/dist/workerLoader.mjs'
3435+ }
3436+ ]
3437+ },
33753438 /* config.module.rule('js').oneOf('js-raw') */
33763439 {
33773440 resourceQuery: / [?&] raw(?:&| =| $ )/ ,
@@ -3694,6 +3757,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
36943757 MODE: ' "production"' ,
36953758 DEV: false ,
36963759 PROD: true ,
3760+ SSR: false ,
36973761 BASE_URL: ' "/"' ,
36983762 ASSET_PREFIX: ' ""'
36993763 },
0 commit comments