You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/next-rspack/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# next-rspack (EXPERIMENTAL)
2
2
3
3
> [!WARNING]
4
-
> This package is currently experimental and actively developed and supported in Next.js’ `canary` branch. To use this, you must be using a published canary build of Next.js.
4
+
> This package is a community effort and is currently experimental. Help improve Next.js and Rspack by providing feedback at https://github.com/vercel/next.js/discussions/77800
5
5
6
6
This plugin allows you to use [Rspack](https://rspack.dev) in place of webpack with Next.js.
// TODO: once Next.js minimal React version is 19.1, remove this override.
15
+
dependencies: {
16
+
react: isReact18 ? '^18.3.1' : '^19.1.0',
17
+
'react-dom': isReact18 ? '^18.3.1' : '^19.1.0',
18
+
},
14
19
})
15
20
16
21
it('includes a React docs link when hydration error does occur',async()=>{
@@ -111,8 +116,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
111
116
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
@@ -193,8 +203,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
193
203
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
194
204
"environmentLabel": null,
195
205
"label": "Runtime Error",
196
-
"source": null,
197
-
"stack": [],
206
+
"source": "index.js (5:20) @ Mismatch
207
+
> 5 | {isClient && <main className="only" />}
208
+
| ^",
209
+
"stack": [
210
+
"main <anonymous> (0:0)",
211
+
"Mismatch index.js (5:20)",
212
+
],
198
213
}
199
214
`)
200
215
}
@@ -264,8 +279,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
264
279
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
265
280
"environmentLabel": null,
266
281
"label": "Runtime Error",
267
-
"source": null,
268
-
"stack": [],
282
+
"source": "index.js (4:5) @ Mismatch
283
+
> 4 | <div className="parent">
284
+
| ^",
285
+
"stack": [
286
+
"div <anonymous> (0:0)",
287
+
"Mismatch index.js (4:5)",
288
+
],
269
289
}
270
290
`)
271
291
}
@@ -325,8 +345,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
325
345
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
326
346
"environmentLabel": null,
327
347
"label": "Runtime Error",
328
-
"source": null,
329
-
"stack": [],
348
+
"source": "index.js (4:5) @ Mismatch
349
+
> 4 | <div className="parent">
350
+
| ^",
351
+
"stack": [
352
+
"div <anonymous> (0:0)",
353
+
"Mismatch index.js (4:5)",
354
+
],
330
355
}
331
356
`)
332
357
}
@@ -384,8 +409,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
384
409
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
@@ -455,8 +485,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
455
485
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
456
486
"environmentLabel": null,
457
487
"label": "Runtime Error",
458
-
"source": null,
459
-
"stack": [],
488
+
"source": "index.js (3:5) @ Page
489
+
> 3 | <table>
490
+
| ^",
491
+
"stack": [
492
+
"table <anonymous> (0:0)",
493
+
"Page index.js (3:5)",
494
+
],
460
495
}
461
496
`)
462
497
}
@@ -520,8 +555,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
520
555
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
521
556
"environmentLabel": null,
522
557
"label": "Runtime Error",
523
-
"source": null,
524
-
"stack": [],
558
+
"source": "index.js (3:5) @ Page
559
+
> 3 | <table>
560
+
| ^",
561
+
"stack": [
562
+
"table <anonymous> (0:0)",
563
+
"Page index.js (3:5)",
564
+
],
525
565
}
526
566
`)
527
567
}
@@ -593,8 +633,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
593
633
"description": "Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",
594
634
"environmentLabel": null,
595
635
"label": "Runtime Error",
596
-
"source": null,
597
-
"stack": [],
636
+
"source": "index.js (8:22) @ Mismatch
637
+
> 8 | {isClient && <main className="second" />}
638
+
| ^",
639
+
"stack": [
640
+
"main <anonymous> (0:0)",
641
+
"Mismatch index.js (8:22)",
642
+
],
598
643
}
599
644
`)
600
645
}
@@ -692,8 +737,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
692
737
This will cause a hydration error.",
693
738
"environmentLabel": null,
694
739
"label": "Runtime Error",
695
-
"source": null,
696
-
"stack": [],
740
+
"source": "index.js (4:7) @ Page
741
+
> 4 | <p>Nested p tags</p>
742
+
| ^",
743
+
"stack": [
744
+
"p <anonymous> (0:0)",
745
+
"Page index.js (4:7)",
746
+
],
697
747
}
698
748
`)
699
749
}
@@ -764,8 +814,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
764
814
This will cause a hydration error.",
765
815
"environmentLabel": null,
766
816
"label": "Runtime Error",
767
-
"source": null,
768
-
"stack": [],
817
+
"source": "index.js (6:11) @ Page
818
+
> 6 | <div>Nested div under p tag</div>
819
+
| ^",
820
+
"stack": [
821
+
"div <anonymous> (0:0)",
822
+
"Page index.js (6:11)",
823
+
],
769
824
}
770
825
`)
771
826
}
@@ -826,8 +881,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
826
881
This will cause a hydration error.",
827
882
"environmentLabel": null,
828
883
"label": "Runtime Error",
829
-
"source": null,
830
-
"stack": [],
884
+
"source": "index.js (2:15) @ Page
885
+
> 2 | return <div><tr></tr></div>
886
+
| ^",
887
+
"stack": [
888
+
"tr <anonymous> (0:0)",
889
+
"Page index.js (2:15)",
890
+
],
831
891
}
832
892
`)
833
893
}
@@ -898,8 +958,13 @@ describe('Error overlay for hydration errors in Pages router', () => {
0 commit comments