labmap/frontend/vite.config.js
dvirlabs df706f235d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fix: Downgrade Vite and disable tree-shaking to fix Rollup build error
2026-03-25 13:31:59 +02:00

22 lines
490 B
JavaScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
build: {
minify: 'esbuild',
rollupOptions: {
treeshake: false,
onwarn(warning, warn) {
// Suppress certain warnings
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') return;
warn(warning);
},
},
commonjsOptions: {
transformMixedEsModules: true,
},
},
});