Change js file not updated #1918
Unanswered
SombreroElGringo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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?
Beta Was this translation helpful? Give feedback.
All reactions