import { defineConfig } from 'vite';
import { resolve } from 'path';

export default defineConfig({
  root: './',
  publicDir: './public',
  build: {
    outDir: './dist',
    emptyOutDir: true
  },
  css: {
    preprocessorOptions: {
      scss: {
        additionalData: `@import "src/styles/abstracts/variables"; @import "src/styles/abstracts/mixins";`
      }
    }
  },
  server: {
    port: 3000,
    open: true,
    host: true
  },
  resolve: {
    alias: {
      '@': resolve(process.cwd(), './src'),
      '@styles': resolve(process.cwd(), './src/styles'),
      '@components': resolve(process.cwd(), './src/components'),
      '@scripts': resolve(process.cwd(), './src/scripts'),
      '@assets': resolve(process.cwd(), './src/assets')
    }
  }
});