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 • committed by spushk
commit fca2410f09
Signed by: spushk
GPG key ID: 7797B761E105E8AA

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(())