Skip to content

A self-hosted media server and file management system

fix: generate code split analysis only in dev env

aminnausinaa23f0d59894
diff --git a/vite.config.ts b/vite.config.ts
index 354c37ee..e9b9a099 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -14,10 +14,12 @@ const env = loadEnv('.env', process.cwd());
export default defineConfig({
mode: env.VITE_APP_ENV === 'local' ? 'development' : 'production',
plugins: [
- visualizer({
- gzipSize: true,
- brotliSize: true,
- }),
+ env.VITE_APP_ENV === 'local'
+ ? visualizer({
+ gzipSize: true,
+ brotliSize: true,
+ })
+ : undefined,
tailwindcss(),
laravel({
input: ['resources/css/app.css', 'resources/js/app.ts'],