diff --git a/.changeset/young-dingos-sleep.md b/.changeset/young-dingos-sleep.md new file mode 100644 index 00000000000..b619d48a129 --- /dev/null +++ b/.changeset/young-dingos-sleep.md @@ -0,0 +1,5 @@ +--- +"@remix-run/dev": patch +--- + +support asset imports when detecting loader changes for HDR diff --git a/packages/remix-dev/devServer_unstable/hdr.ts b/packages/remix-dev/devServer_unstable/hdr.ts index f391e3b3c1d..bacb6475338 100644 --- a/packages/remix-dev/devServer_unstable/hdr.ts +++ b/packages/remix-dev/devServer_unstable/hdr.ts @@ -8,6 +8,7 @@ import { getRouteModuleExports } from "../compiler/utils/routeExports"; import { createMatchPath } from "../compiler/utils/tsconfig"; import invariant from "../invariant"; import { mdxPlugin } from "../compiler/plugins/mdx"; +import { loaders } from "../compiler/utils/loaders"; function isBareModuleId(id: string): boolean { return !id.startsWith("node:") && !id.startsWith(".") && !path.isAbsolute(id); @@ -28,6 +29,7 @@ export let detectLoaderChanges = async (ctx: Context) => { outdir: ".", write: false, entryNames: "[hash]", + loader: loaders, plugins: [ { name: "hmr-loader",