When using postcss plugin, global style does not rebuild if an imported CSS file changed
Stencil version:
@stencil/[email protected]
I'm submitting a:
[x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
- I have a global stylesheet, e.g. src/common/css/global.css
- In global.css, I have
@import '_variables.css'; - And I use @stencil/postcss to preprocess CSS
- Run
stencil build --dev --watch --serve - Updating _variables.css will not trigger global style rebuild, you'll have to restart the server to see the changes
The reason is that, postcss will concatenate global.css with _variables.css, after which there is no @import rules left in cached version global.css. So even the compiler has a check to see if there's any imported CSS files changed, it won't trigger global style rebuild. Although I'm not entirely sure why this doesn't work after I turn off cache by adding enableCache: false in stencil.config.ts.
Expected behavior:
- Global style should rebuild
Steps to reproduce:
See “current behavior”.
Hey there, thank you for the patience getting back to you. The new team is getting started and we're working through the backlog now.
Thank you for adding this. We don't have a timeframe, but we have identified the issue.
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.
Thank you for using Stencil!
Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.
Please reproduce this issue in an Stencil starter component library and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.
For a guide on how to create a good reproduction, see our Contributing Guide.
Hey folks,
I took a crack at reproducing this locally with the latest versions of @stencil/core and @stencil-community/postcss. I was unable to do so with the reproduction case here - https://github.com/rwaskiewicz/stencil-postcss-test-1795. If this is an issue folks are still running in to, can you please add a reproduction case for me? I know it's been a while since there's been activity on this issue, and for that I apologize. If folks don't have bandwidth/want to, I completely understand.
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.
Thank you for using Stencil!