import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';

export default defineConfig({
	plugins: [react()],
	base: './',
	root: 'src/renderer',
	build: {
		outDir: '../../dist/renderer',
		emptyOutDir: true,
	},
	resolve: {
		alias: {
			'@': path.resolve(__dirname, 'src/renderer'),
			'@components': path.resolve(__dirname, 'src/renderer/components'),
			'@layouts': path.resolve(__dirname, 'src/renderer/layouts'),
			'@services': path.resolve(__dirname, 'src/renderer/services'),
		},
	},
	server: {
		port: 5173,
	},
});
