import { defineConfig } from 'vite' import { svelte } from '@sveltejs/vite-plugin-svelte' // Base path is absolute so nested path-routed URLs (e.g. /practice/drill/R3) // resolve hashed asset URLs correctly. Use '/' for a dedicated domain, or set // VITE_BASE=/practice/ at build time for a subpath deploy. // (Relative base './' would break assets on nested routes — do not use it here.) const base = process.env.VITE_BASE ?? '/' export default defineConfig({ base, plugins: [svelte()], build: { target: 'es2020', }, })