Don't produce compressed assets at build time and instead do it as part of the nginx build (#2995)

The core vite build shouldn't be responsible for implementing optimisations that are specific to a particular distribution mechanism. e.g. static compressed files for nginx.

This way the core build is "clean".

Instead, the packager/distributor of the build should be responsible for it. e.g. the nginx docker distribution should do any optimisations that it chooses.
This commit is contained in:
Hugh Nimmo-Smith
2025-02-06 14:16:55 +00:00
committed by GitHub
parent e23d8828ad
commit 0128f2f258
4 changed files with 11 additions and 21 deletions

View File

@@ -6,7 +6,6 @@ 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";
@@ -39,10 +38,6 @@ export default defineConfig(({ mode }) => {
bundleName: "element-call",
uploadToken: process.env.CODECOV_TOKEN,
}),
compression({
exclude: [/config.json/],
}),
];
if (