@@ -8,7 +8,6 @@ exports[`Should compose create Rsbuild config correctly > Enable experiment.adva
88 ' node'
99 ],
1010 name : ' esm' ,
11- devtool : false ,
1211 context : ' <WORKSPACE>' ,
1312 mode : ' production' ,
1413 infrastructureLogging : {
@@ -29,6 +28,7 @@ exports[`Should compose create Rsbuild config correctly > Enable experiment.adva
2928 asyncWebAssembly: true ,
3029 outputModule: true
3130 },
31+ devtool : false ,
3232 externals : [
3333 function () { /* omitted long function */ },
3434 / ^ @rsbuild \\/ core($ | \\ /| \\\\ )/ ,
@@ -97,6 +97,7 @@ exports[`Should compose create Rsbuild config correctly > Enable experiment.adva
9797 ' pnpapi'
9898 ],
9999 output : {
100+ devtoolModuleFilenameTemplate : ({ absoluteResourcePath })=> absoluteResourcePath ,
100101 path: ' <WORKSPACE>/dist' ,
101102 filename: ' [name].js' ,
102103 chunkFilename: ' [name].js' ,
@@ -577,6 +578,17 @@ exports[`Should compose create Rsbuild config correctly > Enable experiment.adva
577578 }
578579 ]
579580 },
581+ /* config.module.rule('json') */
582+ {
583+ test: / \\ . json$ / i ,
584+ oneOf: [
585+ /* config.module.rule('json').oneOf('json-asset-raw') */
586+ {
587+ type: ' asset/source' ,
588+ resourceQuery: / [?&] raw(?:&| =| $ )/
589+ }
590+ ]
591+ },
580592 /* config.module.rule('wasm') */
581593 {
582594 test: / \\ . wasm$ / ,
@@ -792,7 +804,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
792804 dev : {
793805 hmr: true ,
794806 liveReload: true ,
795- browserLogs: true ,
807+ browserLogs: {
808+ stackTrace: ' summary'
809+ },
796810 watchFiles: [
797811 {
798812 paths: [
@@ -872,6 +886,10 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
872886 name: ' rsbuild:entry' ,
873887 setup() {}
874888 },
889+ {
890+ name: ' rsbuild:source-map' ,
891+ setup() {}
892+ },
875893 {
876894 name: ' rsbuild:cache' ,
877895 setup() {}
@@ -1014,7 +1032,6 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
10141032 ' node'
10151033 ],
10161034 name : ' esm' ,
1017- devtool : false ,
10181035 context : ' <WORKSPACE>' ,
10191036 mode : ' production' ,
10201037 infrastructureLogging : {
@@ -1035,6 +1052,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
10351052 asyncWebAssembly: true ,
10361053 outputModule: true
10371054 },
1055+ devtool : false ,
10381056 externals : [
10391057 function () { /* omitted long function */ },
10401058 / ^ @rsbuild \\/ core($ | \\ /| \\\\ )/ ,
@@ -1103,6 +1121,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
11031121 ' pnpapi'
11041122 ],
11051123 output : {
1124+ devtoolModuleFilenameTemplate : ({ absoluteResourcePath })=> absoluteResourcePath ,
11061125 path: ' <WORKSPACE>/dist' ,
11071126 filename: ' [name].js' ,
11081127 chunkFilename: ' 0~[name].js' ,
@@ -1587,6 +1606,17 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
15871606 }
15881607 ]
15891608 },
1609+ /* config.module.rule('json') */
1610+ {
1611+ test: / \\ . json$ / i ,
1612+ oneOf: [
1613+ /* config.module.rule('json').oneOf('json-asset-raw') */
1614+ {
1615+ type: ' asset/source' ,
1616+ resourceQuery: / [?&] raw(?:&| =| $ )/
1617+ }
1618+ ]
1619+ },
15901620 /* config.module.rule('wasm') */
15911621 {
15921622 test: / \\ . wasm$ / ,
@@ -1717,7 +1747,6 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
17171747 ' node'
17181748 ],
17191749 name : ' cjs' ,
1720- devtool : false ,
17211750 context : ' <WORKSPACE>' ,
17221751 mode : ' production' ,
17231752 infrastructureLogging : {
@@ -1737,6 +1766,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
17371766 },
17381767 asyncWebAssembly: true
17391768 },
1769+ devtool : false ,
17401770 externals : [
17411771 / ^ @rsbuild \\/ core($ | \\ /| \\\\ )/ ,
17421772 / ^ rsbuild-plugin-dts($ | \\ /| \\\\ )/ ,
@@ -1804,6 +1834,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
18041834 ' pnpapi'
18051835 ],
18061836 output : {
1837+ devtoolModuleFilenameTemplate : ({ absoluteResourcePath })=> absoluteResourcePath ,
18071838 path: ' <WORKSPACE>/dist' ,
18081839 filename: ' [name].cjs' ,
18091840 chunkFilename: ' 1~[name].cjs' ,
@@ -2288,6 +2319,17 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
22882319 }
22892320 ]
22902321 },
2322+ /* config.module.rule('json') */
2323+ {
2324+ test: / \\ . json$ / i ,
2325+ oneOf: [
2326+ /* config.module.rule('json').oneOf('json-asset-raw') */
2327+ {
2328+ type: ' asset/source' ,
2329+ resourceQuery: / [?&] raw(?:&| =| $ )/
2330+ }
2331+ ]
2332+ },
22912333 /* config.module.rule('wasm') */
22922334 {
22932335 test: / \\ . wasm$ / ,
@@ -2413,7 +2455,6 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
24132455 ' node'
24142456 ],
24152457 name : ' umd' ,
2416- devtool : false ,
24172458 context : ' <WORKSPACE>' ,
24182459 mode : ' production' ,
24192460 infrastructureLogging : {
@@ -2433,6 +2474,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
24332474 },
24342475 asyncWebAssembly: true
24352476 },
2477+ devtool : false ,
24362478 externals : [
24372479 ' assert' ,
24382480 ' assert/strict' ,
@@ -2492,6 +2534,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
24922534 ' pnpapi'
24932535 ],
24942536 output : {
2537+ devtoolModuleFilenameTemplate : ({ absoluteResourcePath })=> absoluteResourcePath ,
24952538 path: ' <WORKSPACE>/dist' ,
24962539 filename: ' [name].js' ,
24972540 chunkFilename: ' 2~[name].js' ,
@@ -2892,6 +2935,17 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
28922935 }
28932936 ]
28942937 },
2938+ /* config.module.rule('json') */
2939+ {
2940+ test: / \\ . json$ / i ,
2941+ oneOf: [
2942+ /* config.module.rule('json').oneOf('json-asset-raw') */
2943+ {
2944+ type: ' asset/source' ,
2945+ resourceQuery: / [?&] raw(?:&| =| $ )/
2946+ }
2947+ ]
2948+ },
28952949 /* config.module.rule('wasm') */
28962950 {
28972951 test: / \\ . wasm$ / ,
@@ -3014,7 +3068,6 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
30143068 ' node'
30153069 ],
30163070 name : ' iife' ,
3017- devtool : false ,
30183071 context : ' <WORKSPACE>' ,
30193072 mode : ' production' ,
30203073 infrastructureLogging : {
@@ -3034,6 +3087,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
30343087 },
30353088 asyncWebAssembly: true
30363089 },
3090+ devtool : false ,
30373091 externals : [
30383092 ' assert' ,
30393093 ' assert/strict' ,
@@ -3093,6 +3147,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
30933147 ' pnpapi'
30943148 ],
30953149 output : {
3150+ devtoolModuleFilenameTemplate : ({ absoluteResourcePath })=> absoluteResourcePath ,
30963151 path: ' <WORKSPACE>/dist' ,
30973152 filename: ' [name].js' ,
30983153 chunkFilename: ' 3~[name].js' ,
@@ -3495,6 +3550,17 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
34953550 }
34963551 ]
34973552 },
3553+ /* config.module.rule('json') */
3554+ {
3555+ test: / \\ . json$ / i ,
3556+ oneOf: [
3557+ /* config.module.rule('json').oneOf('json-asset-raw') */
3558+ {
3559+ type: ' asset/source' ,
3560+ resourceQuery: / [?&] raw(?:&| =| $ )/
3561+ }
3562+ ]
3563+ },
34983564 /* config.module.rule('wasm') */
34993565 {
35003566 test: / \\ . wasm$ / ,
@@ -3616,7 +3682,6 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
36163682 ' web'
36173683 ],
36183684 name : ' mf' ,
3619- devtool : false ,
36203685 context : ' <WORKSPACE>' ,
36213686 mode : ' production' ,
36223687 infrastructureLogging : {
@@ -3636,7 +3701,9 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
36363701 },
36373702 asyncWebAssembly: true
36383703 },
3704+ devtool : false ,
36393705 output : {
3706+ devtoolModuleFilenameTemplate : ({ absoluteResourcePath })=> absoluteResourcePath ,
36403707 path: ' <WORKSPACE>/dist' ,
36413708 filename: ' [name].js' ,
36423709 chunkFilename: ' 4~[name].js' ,
@@ -3726,7 +3793,7 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
37263793 use: [
37273794 /* config.module.rule('css').use('mini-css-extract') */
37283795 {
3729- loader: ' <ROOT>/node_modules/<PNPM_INNER>/@rspack-canary /core/dist/cssExtractLoader.js'
3796+ loader: ' <ROOT>/node_modules/<PNPM_INNER>/@rspack/core/dist/cssExtractLoader.js'
37303797 },
37313798 /* config.module.rule('css').use('css') */
37323799 {
@@ -4075,6 +4142,17 @@ exports[`Should compose create Rsbuild config correctly > Merge Rsbuild config i
40754142 }
40764143 ]
40774144 },
4145+ /* config.module.rule('json') */
4146+ {
4147+ test: / \\ . json$ / i ,
4148+ oneOf: [
4149+ /* config.module.rule('json').oneOf('json-asset-raw') */
4150+ {
4151+ type: ' asset/source' ,
4152+ resourceQuery: / [?&] raw(?:&| =| $ )/
4153+ }
4154+ ]
4155+ },
40784156 /* config.module.rule('wasm') */
40794157 {
40804158 test: / \\ . wasm$ / ,
0 commit comments