Skip to content

Commit 192d353

Browse files
frandioxbrophdawg11
authored andcommitted
Fix Vite critical CSS resolution for route files with absolute paths (#9194)
1 parent a27a3b1 commit 192d353

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/remix-dev/vite/styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export const getStylesForUrl = async ({
198198
let appPath = path.relative(process.cwd(), reactRouterConfig.appDirectory);
199199
let documentRouteFiles =
200200
matchRoutes(routes, url, build.basename)?.map((match) =>
201-
path.join(appPath, reactRouterConfig.routes[match.route.id].file)
201+
path.resolve(appPath, reactRouterConfig.routes[match.route.id].file)
202202
) ?? [];
203203

204204
let styles = await getStylesForFiles({

0 commit comments

Comments
 (0)