@vercel/remix-builder 5.5.10 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as RR from 'react-router';
|
|
2
2
|
import * as build_ from 'virtual:react-router/server-build';
|
|
3
3
|
const build = build_.default || build_;
|
|
4
|
+
|
|
5
|
+
// A custom server entrypoint exports a Web API-compatible handler function.
|
|
6
|
+
// Otherwise, assume the default export is the React Router app manifest.
|
|
4
7
|
export default typeof build === 'function'
|
|
5
8
|
? // A custom server entrypoint is expected to export
|
|
6
9
|
// a Web API-compatible handler function
|
|
7
10
|
build
|
|
8
11
|
: // Otherwise, assume the default export is
|
|
9
12
|
// the React Router app manifest
|
|
10
|
-
|
|
13
|
+
(() => {
|
|
14
|
+
const handler = RR.createRequestHandler(build);
|
|
15
|
+
|
|
16
|
+
// RouterContextProvider is only available in 7.9.0+
|
|
17
|
+
// wrap the handler to provide a RouterContextProvider
|
|
18
|
+
// if we're using the v8 middleware
|
|
19
|
+
return request =>
|
|
20
|
+
build.future.v8_middleware
|
|
21
|
+
? handler(request, new RR.RouterContextProvider())
|
|
22
|
+
: handler(request);
|
|
23
|
+
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/remix-builder",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"homepage": "https://vercel.com/docs",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"path-to-regexp-updated": "npm:path-to-regexp@6.3.0",
|
|
20
20
|
"path-to-regexp": "6.1.0",
|
|
21
21
|
"ts-morph": "12.0.0",
|
|
22
|
-
"@vercel/
|
|
23
|
-
"@vercel/
|
|
22
|
+
"@vercel/static-config": "3.1.2",
|
|
23
|
+
"@vercel/error-utils": "2.0.3"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/jest": "27.5.1",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"jest-junit": "16.0.0",
|
|
31
31
|
"semver": "7.5.2",
|
|
32
32
|
"vitest": "2.0.1",
|
|
33
|
-
"@vercel/build-utils": "13.
|
|
33
|
+
"@vercel/build-utils": "13.6.0"
|
|
34
34
|
},
|
|
35
35
|
"VERCEL_REMIX_RUN_DEV_MAX_VERSION": "2.16.6",
|
|
36
36
|
"scripts": {
|