From f1ded8346b5aea1e192382fa69e99c21fb5d66d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Comeau?= <114004123+sebastien-comeau@users.noreply.github.com> Date: Thu, 21 Nov 2024 20:04:32 -0400 Subject: [PATCH] fix(dev): optimizeDeps entries file path for vite --- packages/remix-dev/vite/plugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/remix-dev/vite/plugin.ts b/packages/remix-dev/vite/plugin.ts index e18bf788568..130ac416638 100644 --- a/packages/remix-dev/vite/plugin.ts +++ b/packages/remix-dev/vite/plugin.ts @@ -1107,9 +1107,9 @@ export const remixVitePlugin: RemixVitePlugin = (remixUserConfig = {}) => { optimizeDeps: { entries: ctx.remixConfig.future.unstable_optimizeDeps ? [ - ctx.entryClientFilePath, + importViteEsmSync().normalizePath(ctx.entryClientFilePath), ...Object.values(ctx.remixConfig.routes).map((route) => - path.join(ctx.remixConfig.appDirectory, route.file) + resolveRelativeRouteFilePath(route, ctx.remixConfig) ), ] : [],