Eleventy does not rebuild the modified js file #1928
Labels
bug: --serve restart
Changes to projects shouldn’t need to restart dev server
feature: 🪞 ignores
Ignores, via configuration API or .eleventyignore or .gitignore etc
Milestone
Discussed in #1918
Originally posted by SombreroElGringo August 3, 2021
Hello,
I have the following problem and have spent a lot of time trying to solve it without success. I have a folder that contains all the labels of my website in X languages. The problem is that when I make a change in that folder it is not updated in the browser, like you have when you change your layouts or content. What is strange is that when I update one file in that folder, I can see in the terminal that a change was made in the file, but when I check the
dist/*.html file
, I cannot see the new label in thedist/**.html
it is not injected. I think it is a problem withbrowser-sync
.I tried playing with
addWatchTarget
andsetBrowserSyncConfig({ files: [...] })
in .eleventy.js
config file, but without success, the changes are still not injected.Also, I found a working case. I update my translations file, then just save in
.elevently.js
to trigger the watch thingy. It will inject the new labels in thedist/**.html
.Here is my structure
.eleventy,js
src/translations/index.js
Here are the logs when I save a change in the
src/translations/**/ *. js
file. We can seeBrowsersync
reloading before writing the change and then reloading after writing is complete. But the change is not injected intodist/**.html
And here are the logs when I save in
.eleventy.js
we can see some diff.Has anyone encountered this or has a workaround?
The text was updated successfully, but these errors were encountered: