vite.config.js
vite.config.js
inside project root.<aside> 💡 Vite supports using ES modules syntax in the config file
</aside>
→ even if the project is not using native Node ESM, e.g. type: "module"
in package.json
vite --config my-config.js
vite.config.ts
수동 설정import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
// <https://vitejs.dev/config/>
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
});