fix: apply lightningcss to bundle once again. Seems the right thing to do

This commit is contained in:
Yiffy Dev 2024-11-02 09:15:11 +05:00
commit d59729e6fe
No known key found for this signature in database
GPG key ID: FB83DFEAFB3F4709

View file

@ -145,10 +145,14 @@ impl SabryBuilder {
.append(true)
.open(path)?;
// merged bundle CSS does require another lightningcss pass
let mut buffer = String::new();
for (_, code) in &self.state.loaded_css_modules {
write!(file, " {}", self.state.css_prelude)?;
write!(file, " {code}")?;
buffer.push_str(code);
}
buffer = self.css_compiler.lightningcss(&buffer)?;
write!(file, "{buffer}")?;
}
Ok(())