chaincss 2.1.33 → 2.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3162,12 +3162,12 @@ function chaincssPlugin(options = {}) {
3162
3162
  }
3163
3163
  function updateCSS() {
3164
3164
  try {
3165
- const freshCSS = compiler.getCombinedCSS();
3166
- if (freshCSS && freshCSS !== generatedCSS) {
3167
- generatedCSS = freshCSS;
3168
- if (options.verbose) {
3169
- log(`CSS updated: ${generatedCSS.length} bytes`);
3170
- }
3165
+ const compilerCSS = compiler.getCombinedCSS();
3166
+ if (compilerCSS && compilerCSS.trim()) {
3167
+ generatedCSS = compilerCSS;
3168
+ }
3169
+ if (options.verbose) {
3170
+ log(`CSS updated: ${generatedCSS.length} bytes`);
3171
3171
  }
3172
3172
  return generatedCSS;
3173
3173
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chaincss",
3
- "version": "2.1.33",
3
+ "version": "2.1.34",
4
4
  "description": "ChainCSS - The first CSS-in-JS library with true auto-detection mixed mode. Zero runtime by default, dynamic when you need it.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -84,12 +84,13 @@ export default function chaincssPlugin(options: ChainCSSPluginOptions = {}): Plu
84
84
  // Get CSS from compiler safely
85
85
  function updateCSS(): string {
86
86
  try {
87
- const freshCSS = compiler.getCombinedCSS();
88
- if (freshCSS && freshCSS !== generatedCSS) {
89
- generatedCSS = freshCSS;
90
- if (options.verbose) {
91
- log(`CSS updated: ${generatedCSS.length} bytes`);
92
- }
87
+ // Get CSS from both compiler and our generatedCSS
88
+ const compilerCSS = compiler.getCombinedCSS();
89
+ if (compilerCSS && compilerCSS.trim()) {
90
+ generatedCSS = compilerCSS;
91
+ }
92
+ if (options.verbose) {
93
+ log(`CSS updated: ${generatedCSS.length} bytes`);
93
94
  }
94
95
  return generatedCSS;
95
96
  } catch (error) {