portfolio-page/vite.config.ts

35 lines
693 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// https://vite.dev/config/
export default defineConfig({
plugins: [
react({
babel: {
plugins: [['babel-plugin-react-compiler', {}]],
},
}),
],
base: '/',
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
optimizeDeps: {
include: ['lucide-react'],
entries: ['src/**/*.tsx', 'src/**/*.ts'],
force: false,
},
server: {
fs: {
allow: ['..'],
},
},
});