Skip to content

Commit 07aa497

Browse files
committed
Moved the import from require syntax to dynamic import
1 parent 00225e0 commit 07aa497

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 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,8 @@ async function handlePrerender(
28152814
concurrency = prerender.unstable_concurrency ?? 1;
28162815
}
28172816

2817+
const pMap = await import('p-map')
2818+
28182819
await pMap(build.prerender, prerenderSinglePath, { concurrency });
28192820
}
28202821

0 commit comments

Comments
 (0)