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.
- package/dist/plugins/vite.js +6 -6
- package/package.json +1 -1
- package/src/plugins/vite.ts +7 -6
package/dist/plugins/vite.js
CHANGED
|
@@ -3162,12 +3162,12 @@ function chaincssPlugin(options = {}) {
|
|
|
3162
3162
|
}
|
|
3163
3163
|
function updateCSS() {
|
|
3164
3164
|
try {
|
|
3165
|
-
const
|
|
3166
|
-
if (
|
|
3167
|
-
generatedCSS =
|
|
3168
|
-
|
|
3169
|
-
|
|
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
package/src/plugins/vite.ts
CHANGED
|
@@ -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
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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) {
|