Skip to content

Commit

Permalink
fix(dev): support asset imports when detecting loader changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pcattori committed May 15, 2023
1 parent bb239f4 commit 03ce36f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/young-dingos-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@remix-run/dev": patch
---

support asset imports when detecting loader changes for HDR
2 changes: 2 additions & 0 deletions packages/remix-dev/devServer_unstable/hdr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -28,6 +29,7 @@ export let detectLoaderChanges = async (ctx: Context) => {
outdir: ".",
write: false,
entryNames: "[hash]",
loader: loaders,
plugins: [
{
name: "hmr-loader",
Expand Down

0 comments on commit 03ce36f

Please sign in to comment.