Closed paulhmorris closed 9 months ago
Yes
npx create-remix@latest --template remix-run/blues-stack npm run build npm run dev
In root.tsx, log anything in the loader to trigger HDR
root.tsx
export const loader = async ({ request }: LoaderFunctionArgs) => { const data = { foo: "bar", foo2: "bar2", }; console.log(data); return json({ user: await getUser(request) }); }; // Logs nothing on HDR
Nothing is logged. Stop the dev process and restart --> now the data is logged.
Comment out a line of the object and save
const data = { foo: "bar", // foo2: "bar2", }; console.log(data); // still logs { foo: 'bar', foo2: 'bar2' } from previous file state
The updated object is not logged. The console indicated that hmr + hdr ran. Even declaring the object outside the loader doesn't resolve it.
Using the server.ts from before #221 resolves the issue, but I don't know enough about what's going on to give any more helpful info.
server.ts
Thanks!
Changing code inside loaders or used inside loaders should rerun loaders with new code.
Changing code inside loaders or used inside loaders does not rerun loaders with new code, and a full server restart is required to see changes.
I had the same issue, and https://github.com/remix-run/blues-stack/pull/222 fixed it.
Have you experienced this bug with the latest version of the template?
Yes
Steps to Reproduce
In
root.tsx
, log anything in the loader to trigger HDRNothing is logged. Stop the dev process and restart --> now the data is logged.
Comment out a line of the object and save
The updated object is not logged. The console indicated that hmr + hdr ran. Even declaring the object outside the loader doesn't resolve it.
Using the
server.ts
from before #221 resolves the issue, but I don't know enough about what's going on to give any more helpful info.Thanks!
Expected Behavior
Changing code inside loaders or used inside loaders should rerun loaders with new code.
Actual Behavior
Changing code inside loaders or used inside loaders does not rerun loaders with new code, and a full server restart is required to see changes.