Skip to content

Commit b2d0658

Browse files
committed
Fix vite plugin, Apply css optimize
1 parent 20a2faa commit b2d0658

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

libs/extractor/src/extract_style/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,13 @@ impl ExtractStyleProperty for ExtractStaticStyle {
110110
StyleProperty::ClassName(sheet_to_classname(
111111
self.property.as_str(),
112112
self.level,
113-
Some(
114-
if MAINTAIN_VALUE_PROPERTIES.contains(self.property.as_str()) {
113+
Some(&optimize_value(
114+
&if MAINTAIN_VALUE_PROPERTIES.contains(self.property.as_str()) {
115115
self.value.to_string()
116116
} else {
117-
optimize_value(convert_value(self.value.as_str()).as_str())
118-
}
119-
.as_str(),
120-
),
117+
convert_value(self.value.as_str())
118+
},
119+
)),
121120
s.as_deref(),
122121
self.style_order,
123122
))

libs/extractor/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use oxc_allocator::{Allocator, CloneIn};
33
use oxc_ast::ast::{Expression, JSXAttributeValue, Statement};
44
use oxc_codegen::Codegen;
55
use oxc_parser::Parser;
6-
use oxc_span::{SourceType, SPAN};
6+
use oxc_span::{SPAN, SourceType};
77
use oxc_syntax::operator::UnaryOperator;
88
use std::collections::HashSet;
99

0 commit comments

Comments
 (0)