You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i’m updating my main.css file, i get a perfect blazing fast (amazing work btw) live reload.
But if i update one of the css file imported in main.css, the console tell me that the live reload worked, but the styles are not updated until i reload the page.
I looked a bit at the code, and it seems that this line of code is the one doing the work.
From what i understand here, the css update of the page is done by updating the url to the main file, but it doesn’t account for the imported files that this one may contain.
If i try to save the main.css after updating the imported file, the live reload doesn’t work either so i guess it has to do with how the server look at the imported css files, if it looks at those.
The text was updated successfully, but these errors were encountered:
I fixed it by using <link rel="stylesheet" href="/css/post.css"> to refer to css files instead of using {%- css %}{% include "/css/post.css" %}{%- endcss %} in my .njk files.
I think this is similar to what I raised here: 11ty/eleventy#2807. I'm struggling to get live reloading working with inlined CSS, and I think it's because of the same bit of code referenced above in #63 (comment). In my case, I don't have a link[rel="stylesheet"], since my CSS is inlined.
hi there.
i’m using eleventy 2.0 and my folder with the simplest setup for css file: a
css
folder that contains amain.css
filled like thisWhen i’m updating my
main.css
file, i get a perfect blazing fast (amazing work btw) live reload.But if i update one of the css file imported in
main.css
, the console tell me that the live reload worked, but the styles are not updated until i reload the page.I looked a bit at the code, and it seems that this line of code is the one doing the work.
eleventy-dev-server/client/reload-client.js
Line 178 in 8665cce
From what i understand here, the css update of the page is done by updating the url to the main file, but it doesn’t account for the imported files that this one may contain.
If i try to save the
main.css
after updating the imported file, the live reload doesn’t work either so i guess it has to do with how the server look at the imported css files, if it looks at those.The text was updated successfully, but these errors were encountered: