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
I'm requesting a way to hook into panda cssgen --watch to prevent styles.css from being written to disk if the content hasn't changed.
Problem Statement/Justification
We are trying to fit Panda into our very large ecosystem and are running into an issue when the generated styles.css is rewritten to disk even if there hasn't been a style change. This causes Webpack to perform two compilations. The first is for the JSX change, and the second is for panda cssgen writing the styles.css. We were using the postCSS plugin, but moved away from it due to HMR performance.
When an actual style change is made causing a different style.css content, we are OK with the double-compilation that occurs, as that's expected. We want to avoid a second pass of HMR updates if possible.
Proposed Solution or API
My first thought was to inspect the final output of styles.css and compare it to the previous run using the cssgen:done hook. However, this hook doesn't provide a way to bypass or skip writing to disk.
This discussion was converted from issue #3109 on January 24, 2025 11:53.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
I'm requesting a way to hook into
panda cssgen --watch
to preventstyles.css
from being written to disk if the content hasn't changed.Problem Statement/Justification
We are trying to fit Panda into our very large ecosystem and are running into an issue when the generated
styles.css
is rewritten to disk even if there hasn't been a style change. This causes Webpack to perform two compilations. The first is for the JSX change, and the second is forpanda cssgen
writing thestyles.css
. We were using the postCSS plugin, but moved away from it due to HMR performance.When an actual style change is made causing a different
style.css
content, we are OK with the double-compilation that occurs, as that's expected. We want to avoid a second pass of HMR updates if possible.Proposed Solution or API
My first thought was to inspect the final output of styles.css and compare it to the previous run using the
cssgen:done
hook. However, this hook doesn't provide a way to bypass or skip writing to disk.Alternatives
No response
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions