Removed lightningcss (#6509)

Co-authored-by: SamTv12345 <samtv12345@samtv12345.com>
This commit is contained in:
SamTV12345 2024-07-12 11:16:07 +02:00 committed by GitHub
parent c5b7442acd
commit b84b4c0878
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 149 deletions

View file

@ -300,7 +300,13 @@ const getFileCompressed = async (filename, contentType) => {
try {
logger.info('Compress CSS file %s.', filename);
content = await compressCSS(filename, ROOT_DIR);
const compressResult = await compressCSS(content);
if (compressResult.error) {
console.error(`Error compressing CSS (${filename}) using terser`, compressResult.error);
} else {
content = compressResult.code.toString(); // Convert content obj code to string
}
} catch (error) {
console.error(`CleanCSS.minify() returned an error on ${filename}: ${error}`);
}