-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
JS file changes require server restart #647
Comments
Thanks @josh-collinsworth I'm in the middle of releasing Lume v2.3 with some new features, and one of the changes is to run the build in a Worker. This will allows to restart the build completely after some changes like modify the Unfortunately, now Prism is failing: Inspecting the NPM code, seems that the Replacing this variable with Maybe this is a Deno bug? If Workers are not stable on Deno, I can revert the changes and run the build in the main thread instead of a Worker, but it's a pitty because we lose the ability to rebuild after installing a new plugin. |
FYI I have filed an issue with the |
Seems that the Deno bug with Workers is fixed! |
Hi @oscarotero - it looks like we may have a recent regression on this bug somewhere. (Or, maybe it was fixed for one file type, but not another.) I'm noticing that I need to restart the server before I can see changes to I believe this was working before, but if so, it hasn't been for a bit, I'm told. Any insights as to where this issue with |
Hi. I just tried to modify Do you know any particular file with which doesn't work? |
Sorry, @oscarotero, I didn't realize the problem is much more narrowly scoped than I thought. The issue can be seen in this PR (which I think should be merged into Specifically, the issue seems to occur in the Changes made to the base So maybe the issue is with one |
Okay, I see you´re importing the components as esm modules (i.e. Sadly, Deno does't have any way to reload a module once they are imported. This is why in Lume components should be consumed through the This doesn't refresh: import Header from "./_components/header.ts";
export default function () {
<Header />
} This does: export default function ({comp}) {
<comp.Header />
} |
@oscarotero Thank you so much for your help! Problem solved. ✅ |
Version
2.2.4
Platform
MacOS Sonoma 14.5 (M2)
What steps will reproduce the bug?
.js
file. In my case, I have a/_includes/layout.tsx
file that calls to.js
file in the root folder via a<script>
tag.)(Note: it appears this may be the case with images as well; perhaps any static assets)
How often does it reproduce? Is there a required condition?
As far as I can tell, there's nothing special other than the conditions above.
What is the expected behavior?
After detecting the change and sending it to the browser, the new JS should load instead of the old JS.
What do you see instead?
The old, initial JS continues to load and run until and unless the server is restarted.
Additional information
We're seeing this issue on https://github.com/denoland/docs, if you'd like to reproduce from there. (In my case, editing
sidebar.client.ts
, which should run on any individual doc page.)The text was updated successfully, but these errors were encountered: