This commit is contained in:
2025-11-06 01:40:00 +01:00
parent de5f54f4bc
commit 602c5a40f1
108 changed files with 9859 additions and 1382 deletions

View File

@@ -1,11 +1,42 @@
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
tailwindcss()
],
})
plugins: [react()],
server: {
allowedHosts: true,
},
esbuild: {
logOverride: {
'ignored-directive': 'silent',
},
},
logLevel: 'info',
build: {
rollupOptions: {
onwarn(warning, warn) {
// ignore certain harmless warnings
if (
warning.message.includes('Module level directives') ||
warning.message.includes('"use client"') ||
warning.message.includes('"was ignored"')
) {
return;
}
// FAIL build on unresolved imports
if (warning.code === 'UNRESOLVED_IMPORT') {
throw new Error(`Build failed due to unresolved import:\n${warning.message}`);
}
// FAIL build on missing exports (like your Input error)
if (warning.code === 'PLUGIN_WARNING' && /is not exported/.test(warning.message)) {
throw new Error(`Build failed due to missing export:\n${warning.message}`);
}
// other warnings: log normally
warn(warning);
},
},
},
});