From c9642027d8f5396589ed995d9dd45309642a1c28 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Wed, 3 May 2023 11:15:29 -0400 Subject: [PATCH 1/2] fix(remix-dev): normalize path before testing if it is a route entry --- packages/remix-dev/compiler/watch.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/remix-dev/compiler/watch.ts b/packages/remix-dev/compiler/watch.ts index 2b0461850ce..7c1901121ae 100644 --- a/packages/remix-dev/compiler/watch.ts +++ b/packages/remix-dev/compiler/watch.ts @@ -8,6 +8,7 @@ import { type Manifest } from "../manifest"; import * as Compiler from "./compiler"; import type { Context } from "./context"; import { logThrown } from "./utils/log"; +import { normalizeSlashes } from "../config/routes"; function isEntryPoint(config: RemixConfig, file: string): boolean { let appFile = path.relative(config.appDirectory, file); @@ -16,7 +17,8 @@ function isEntryPoint(config: RemixConfig, file: string): boolean { config.entryServerFile, ...Object.values(config.routes).map((route) => route.file), ]; - return entryPoints.includes(appFile); + let normalized = normalizeSlashes(appFile); + return entryPoints.includes(normalized); } export type WatchOptions = { From 3f205e8b06f159619ebd76baa1d44d8460bead4b Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Wed, 3 May 2023 11:18:13 -0400 Subject: [PATCH 2/2] Create light-bikes-exercise.md --- .changeset/light-bikes-exercise.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/light-bikes-exercise.md diff --git a/.changeset/light-bikes-exercise.md b/.changeset/light-bikes-exercise.md new file mode 100644 index 00000000000..bccbcb7e294 --- /dev/null +++ b/.changeset/light-bikes-exercise.md @@ -0,0 +1,6 @@ +--- +"remix": patch +"@remix-run/dev": patch +--- + +normalize file paths before testing if a changed file is a route entry