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/image-melody/',
        build: {
            outDir: '../../app/public/drops/image-melody',
            emptyOutDir: true,
        },
    }),
)
