-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
page does not refresh when _components/XXX.tsx is modified #590
Comments
Hi. In Lume, components are loaded automatically in the export default function ({ comp}: Lume.Data ) {
return <p><comp.Button /></p>
} |
this can be workaround using watch or hmr.
"tasks": {
- "lume": "echo \"import 'lume/cli.ts'\" | deno run -A -",
- "build": "deno task lume",
- "serve": "deno task lume -s"
+ "build": "deno run -A _main.ts",
+ "serve": "deno run -A --unstable-hmr _main.ts -s"
}, it should work like following:
|
I use I use a lot of functions between files too.
|
The problem is Deno caches the imported modules and there's no way to invalidate the cache to refresh the modules. In Lume, this limitation is solved loading the file with a hash (for example, Deno added recently a way to do hot module replacement (https://deno.com/blog/v1.38#hot-module-replacement) but it's still unstable and doesn't work well with Lume. |
Related: denoland/deno#8327 |
I totally missed this... now my site is mostly stable I don't have a easy way to test this. Hopefully someone else will find this useful. |
This does not work for The terminal output this: Changes detected:
- /scripts/feature-flags.page.tsx
Changes sent to the browser But the brother never reloads that page. Even though I can see: Command run: deno task lume -sw |
Version
v2.0.1
Platform
Linux
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
100%
What is the expected behavior?
the page should refresh to new content
What do you see instead?
The page is stuck. Manual refresh doesn't work. I have to restart lume to see the new page.
Additional information
No response
The text was updated successfully, but these errors were encountered: