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: docs/migrate-v1-to-v2.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,12 +57,12 @@ The minimum supported Node.js version is now `^20.19.0 || >=22.12.0`.
57
57
58
58
> Refer to the [http-proxy-middleware v3 migration guide](https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md) for details.
59
59
60
-
### Default app now uses `connect`
60
+
### Default app now uses `connect-next`
61
61
62
62
When `devServer.app` is omitted, `@rspack/dev-server` now creates a
63
-
`connect` app instead of an Express app.
63
+
`connect-next` app instead of an Express app.
64
64
65
-
The dev server only needs a minimal middleware pipeline. Connect provides the same `(req, res, next)` interface as Express while being significantly smaller and having fewer dependencies, making it a better fit for this use case.
65
+
The dev server only needs a minimal middleware pipeline. [connect-next](https://github.com/rstackjs/connect-next) is an actively maintained fork of Connect that keeps the same `(req, res, next)`middleware interface while staying smaller than Express and having fewer dependencies.
66
66
67
67
If you relied on Express-only APIs on `devServer.app`, such as `app.get()`,
68
68
`app.post()`, or `res.send()`, provide your own Express app explicitly:
Copy file name to clipboardExpand all lines: tests/e2e/__snapshots__/app.test.js.snap
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
// Rstest Snapshot v1
2
2
3
-
exports[`app option > should work using "connect (async)" application and "http" server > should handle GET request to index route (/) > console messages 1`] =`
3
+
exports[`app option > should work using "connect-next (async)" application and "http" server > should handle GET request to index route (/) > console messages 1`] =`
4
4
[
5
5
"[rspack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.",
6
6
"[HMR] Waiting for update signal from WDS...",
7
7
"Hey.",
8
8
]
9
9
`;
10
10
11
-
exports[`app option > should work using "connect (async)" application and "http" server > should handle GET request to index route (/) > page errors 1`] =`[]`;
11
+
exports[`app option > should work using "connect-next (async)" application and "http" server > should handle GET request to index route (/) > page errors 1`] =`[]`;
12
12
13
-
exports[`app option > should work using "connect (async)" application and "http" server > should handle GET request to index route (/) > response status 1`] =`200`;
13
+
exports[`app option > should work using "connect-next (async)" application and "http" server > should handle GET request to index route (/) > response status 1`] =`200`;
14
14
15
-
exports[`app option > should work using "connect (async)" application and "http" server > should handle GET request to index route (/) > response text 1`] =`
15
+
exports[`app option > should work using "connect-next (async)" application and "http" server > should handle GET request to index route (/) > response text 1`] =`
16
16
"
17
17
<!DOCTYPE html>
18
18
<html>
@@ -28,19 +28,19 @@ exports[`app option > should work using "connect (async)" application and "http"
28
28
"
29
29
`;
30
30
31
-
exports[`app option > should work using "connect" application and "http" server > should handle GET request to index route (/) > console messages 1`] = `
31
+
exports[`app option > should work using "connect-next" application and "http" server > should handle GET request to index route (/) > console messages 1`] = `
32
32
[
33
33
"[rspack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.",
34
34
"[HMR] Waiting for update signal from WDS...",
35
35
"Hey.",
36
36
]
37
37
`;
38
38
39
-
exports[`app option > should work using "connect" application and "http" server > should handle GET request to index route (/) > page errors 1`] = `[]`;
39
+
exports[`app option > should work using "connect-next" application and "http" server > should handle GET request to index route (/) > page errors 1`] = `[]`;
40
40
41
-
exports[`app option > should work using "connect" application and "http" server > should handle GET request to index route (/) > response status 1`] = `200`;
41
+
exports[`app option > should work using "connect-next" application and "http" server > should handle GET request to index route (/) > response status 1`] = `200`;
42
42
43
-
exports[`app option > should work using "connect" application and "http" server > should handle GET request to index route (/) > response text 1`] = `
43
+
exports[`app option > should work using "connect-next" application and "http" server > should handle GET request to index route (/) > response text 1`] = `
44
44
"
45
45
<!DOCTYPE html>
46
46
<html>
@@ -56,19 +56,19 @@ exports[`app option > should work using "connect" application and "http" server
56
56
"
57
57
`;
58
58
59
-
exports[`app option > should work using "connect" application and "http2" server > should handle GET request to index route (/) > console messages 1`] = `
59
+
exports[`app option > should work using "connect-next" application and "http2" server > should handle GET request to index route (/) > console messages 1`] = `
60
60
[
61
61
"[rspack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.",
62
62
"[HMR] Waiting for update signal from WDS...",
63
63
"Hey.",
64
64
]
65
65
`;
66
66
67
-
exports[`app option > should work using "connect" application and "http2" server > should handle GET request to index route (/) > page errors 1`] = `[]`;
67
+
exports[`app option > should work using "connect-next" application and "http2" server > should handle GET request to index route (/) > page errors 1`] = `[]`;
68
68
69
-
exports[`app option > should work using "connect" application and "http2" server > should handle GET request to index route (/) > response status 1`] = `200`;
69
+
exports[`app option > should work using "connect-next" application and "http2" server > should handle GET request to index route (/) > response status 1`] = `200`;
70
70
71
-
exports[`app option > should work using "connect" application and "http2" server > should handle GET request to index route (/) > response text 1`] = `
71
+
exports[`app option > should work using "connect-next" application and "http2" server > should handle GET request to index route (/) > response text 1`] = `
72
72
"
73
73
<!DOCTYPE html>
74
74
<html>
@@ -84,19 +84,19 @@ exports[`app option > should work using "connect" application and "http2" server
84
84
"
85
85
`;
86
86
87
-
exports[`app option > should work using "connect" application and "https" server > should handle GET request to index route (/) > console messages 1`] = `
87
+
exports[`app option > should work using "connect-next" application and "https" server > should handle GET request to index route (/) > console messages 1`] = `
88
88
[
89
89
"[rspack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.",
90
90
"[HMR] Waiting for update signal from WDS...",
91
91
"Hey.",
92
92
]
93
93
`;
94
94
95
-
exports[`app option > should work using "connect" application and "https" server > should handle GET request to index route (/) > page errors 1`] = `[]`;
95
+
exports[`app option > should work using "connect-next" application and "https" server > should handle GET request to index route (/) > page errors 1`] = `[]`;
96
96
97
-
exports[`app option > should work using "connect" application and "https" server > should handle GET request to index route (/) > response status 1`] = `200`;
97
+
exports[`app option > should work using "connect-next" application and "https" server > should handle GET request to index route (/) > response status 1`] = `200`;
98
98
99
-
exports[`app option > should work using "connect" application and "https" server > should handle GET request to index route (/) > response text 1`] = `
99
+
exports[`app option > should work using "connect-next" application and "https" server > should handle GET request to index route (/) > response text 1`] = `
0 commit comments