import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { fileURLToPath, URL } from 'url' // https://vite.dev/config/ export default defineConfig({ server: { host: true, port: 5173, allowedHosts: [ 'react.sokuree.com', ] }, plugins: [react()], // Vite Path Aliases: import 경로를 src 기준의 절대경로(alias)로 설정 resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), '@assets': fileURLToPath(new URL('./src/assets', import.meta.url)), '@components': fileURLToPath(new URL('./src/components', import.meta.url)), '@pages': fileURLToPath(new URL('./src/pages', import.meta.url)), '@recoil': fileURLToPath(new URL('./src/recoil', import.meta.url)), '@types': fileURLToPath(new URL('./src/types', import.meta.url)), '@apis': fileURLToPath(new URL('./src/apis', import.meta.url)), }, }, // SCSS 전역 설정 css: { preprocessorOptions: { scss: { additionalData: '@import "./src/assets/styles/main.scss";' }, }, }, })