Files
solidtime/vite.config.js
Constantin Graf b506bb16dd Remove unused Filament admin theme to fix Tailwind v4/v3 build conflict
Filament v5's bundled theme.css uses Tailwind v4's CSS-first import
syntax, which broke when compiled through the app's Tailwind v3
PostCSS pipeline via the custom viteTheme() registration. The custom
theme was unedited boilerplate since it was scaffolded, with no actual
branding, so drop it and let the panel use Filament's own precompiled
default styles instead of migrating the whole frontend to Tailwind v4.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 13:29:30 +02:00

49 lines
1.4 KiB
JavaScript

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
import checker from 'vite-plugin-checker';
import { collectModuleAssetsPaths, collectModulePlugins } from './vite-module-loader.js';
async function getConfig() {
const paths = ['resources/js/app.ts', 'resources/css/app.css'];
const modulePaths = await collectModuleAssetsPaths('extensions');
const additionalPlugins = await collectModulePlugins('extensions');
return defineConfig({
base: './',
build: {
sourcemap: true, // Source map generation must be turned on
},
plugins: [
laravel({
input: [...paths, ...modulePaths],
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
},
},
}),
checker({
// e.g. use TypeScript check
typescript: true,
vueTsc: true,
lintCommand: 'eslint "./**/*.{ts,vue}"',
}),
...additionalPlugins,
],
server: {
host: true,
hmr: {
host: process.env.VITE_HOST_NAME,
clientPort: 80,
},
},
});
}
export default getConfig();