Fix broken CSS due to bug in Cloudflare minifier
This commit is contained in:
parent
165c747d62
commit
b7e304a708
|
|
@ -71,6 +71,11 @@ export default defineConfig({
|
|||
},
|
||||
}),
|
||||
],
|
||||
output: {
|
||||
// Inject `.min` into the filename of minified CSS files to tell Cloudflare not to minify it again.
|
||||
// Cloudflare's minifier breaks the CSS due to a bug where it removes whitespace around calc() plus operators.
|
||||
assetFileNames: (info) => `assets/[name]-[hash]${info.name?.endsWith(".css") ? ".min" : ""}[extname]`,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue