Precompress assets and set the right cache headers

This commit is contained in:
Quentin Gliech
2024-11-15 00:53:07 +01:00
parent 50934a53cd
commit f022eb09a2
5 changed files with 26 additions and 18 deletions

View File

@@ -6,6 +6,7 @@ Please see LICENSE in the repository root for full details.
*/
import { defineConfig, loadEnv } from "vite";
import { compression } from "vite-plugin-compression2";
import svgrPlugin from "vite-plugin-svgr";
import htmlTemplate from "vite-plugin-html-template";
import { codecovVitePlugin } from "@codecov/vite-plugin";
@@ -38,6 +39,10 @@ export default defineConfig(({ mode }) => {
bundleName: "element-call",
uploadToken: process.env.CODECOV_TOKEN,
}),
compression({
exclude: [/config.json/],
}),
];
if (