This commit is contained in:
2025-11-07 00:46:35 +01:00
parent 2118f002d1
commit c3f837b90f
143 changed files with 4223 additions and 9686 deletions

View File

@@ -1,42 +1,11 @@
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
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);
},
},
},
});
plugins: [
react(),
tailwindcss()
],
})