Skip to content

Commit df22b53

Browse files
committed
Add comments
1 parent 3c98bcb commit df22b53

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,7 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = () => {
11691169

11701170
viteChildCompiler = await vite.createServer({
11711171
...viteUserConfig,
1172+
// Ensure child compiler cannot overwrite the default cache directory
11721173
cacheDir: "node_modules/.vite-child-compiler",
11731174
mode: viteConfig.mode,
11741175
server: {
@@ -1200,6 +1201,7 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = () => {
12001201
{
12011202
name: "react-router:override-optimize-deps",
12021203
config(userConfig) {
1204+
// Prevent unnecessary dependency optimization in the child compiler
12031205
if (
12041206
ctx.reactRouterConfig.future.unstable_viteEnvironmentApi &&
12051207
userConfig.environments

0 commit comments

Comments
 (0)