import { defineConfig } from 'vite'; import tailwindcss from '@tailwindcss/vite'; import pug from 'pug'; export default defineConfig({ plugins: [ tailwindcss(), { name: 'vite-plugin-pug', transform(src, id) { if (id.endsWith('.pug')) { const html = pug.compile(src)(); return { code: `export default ${JSON.stringify(html)};`, map: null }; } } } ], server: { port: 5173, host: true } });