Skip to content

Commit 2570e10

Browse files
committed
[Fix:Node-v20]: Dynamic inline import for p-map
fixes
1 parent 89e2bfe commit 2570e10

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,3 +452,4 @@
452452
- zeromask1337
453453
- zheng-chuang
454454
- zxTomw
455+
- HeyyyNeo

packages/react-router-dev/vite/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import pick from "lodash/pick";
3636
import jsesc from "jsesc";
3737
import colors from "picocolors";
3838
import kebabCase from "lodash/kebabCase";
39-
import pMap from "p-map";
4039

4140
import * as Typegen from "../typegen";
4241
import type { RouteManifestEntry, RouteManifest } from "../config/routes";
@@ -2815,6 +2814,7 @@ async function handlePrerender(
28152814
concurrency = prerender.unstable_concurrency ?? 1;
28162815
}
28172816

2817+
const pMap = (await import("p-map")).default;
28182818
await pMap(build.prerender, prerenderSinglePath, { concurrency });
28192819
}
28202820

0 commit comments

Comments
 (0)