import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import tailwindcss from '@tailwindcss/vite' import { fileURLToPath, URL } from 'node:url' // Served by the SPRO gateway under a URL PREFIX (see ../__init__.py → // MODULE_PREFIX). `base` MUST equal that prefix WITH a trailing slash, or built // asset URLs 404 behind the gateway. It also feeds import.meta.env.BASE_URL, // which src/api/index.ts uses to build the data-API base. const BASE = '/module/temper_rejects/' export default defineConfig({ base: BASE, plugins: [vue(), tailwindcss()], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), }, dedupe: ['vue', 'primevue', '@primevue/themes', '@primeuix/themes', 'primeicons'], }, build: { outDir: 'dist', emptyOutDir: true, chunkSizeWarningLimit: 1500, }, })