import { fileURLToPath, URL } from 'node:url'
import { defineConfig, mergeConfig } from 'vite'
import sharedConfig from '../../shared/vite.config.js'

export default defineConfig(
    mergeConfig(sharedConfig, {
        resolve: {
            alias: {
                '@': fileURLToPath(new URL('./src', import.meta.url)),
                '@shared': fileURLToPath(
                    new URL('../../shared', import.meta.url),
                ),
            },
        },
        base: '/drops/endless-journal/',
        build: {
            outDir: '../../app/public/drops/endless-journal',
            emptyOutDir: true,
        },
    }),
)
