mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-03 11:44:03 +00:00
Compress SVG when building dist
This commit is contained in:
parent
a707b51053
commit
fb420fa1b1
1 changed files with 4 additions and 0 deletions
|
@ -7,6 +7,8 @@ import viteCompression from "vite-plugin-compression";
|
|||
const postCssScss = require("postcss-scss");
|
||||
const postcssRTLCSS = require("postcss-rtlcss");
|
||||
|
||||
const viteCompressionFilter = /\.(js|mjs|json|css|html|svg)$/i;
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
|
@ -20,9 +22,11 @@ export default defineConfig({
|
|||
}),
|
||||
viteCompression({
|
||||
algorithm: "gzip",
|
||||
filter: viteCompressionFilter,
|
||||
}),
|
||||
viteCompression({
|
||||
algorithm: "brotliCompress",
|
||||
filter: viteCompressionFilter,
|
||||
}),
|
||||
],
|
||||
css: {
|
||||
|
|
Loading…
Reference in a new issue