withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
46.81k stars 2.49k forks source link

Changes to imported css file do not appear on page even after a full page refresh #12275

Open lilnasy opened 3 weeks ago

lilnasy commented 3 weeks ago

Astro Info

Astro                    v4.16.6
Node                     v18.20.3
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When a css file is imported onto a page using @import, the dev server does not respond to any changes made to that file. Additionally, it is cached permanently and full page refreshes are not enough to get the new style on the page. The dev server must be restarted.

What's the expected result?

When the imported css file is updated, the styles on the page refresh automatically.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-nds5id?file=src%2Fimported.css,src%2Flayouts%2FLayout.astro&on=stackblitz

Participation

mjbain10 commented 3 weeks ago

I'm experiencing the same issue