42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import inertia from '@inertiajs/vite';
|
|
import { wayfinder } from '@laravel/vite-plugin-wayfinder';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import laravel from 'laravel-vite-plugin';
|
|
import { defineConfig } from 'vite';
|
|
import { fileURLToPath } from 'url';
|
|
import path from 'path';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
laravel({
|
|
input: ['resources/css/app.css', 'resources/js/app.tsx'],
|
|
refresh: true,
|
|
}),
|
|
inertia(),
|
|
react({
|
|
// Babel compiler can sometimes cause issues with third-party hooks in React 19
|
|
// babel: {
|
|
// plugins: ['babel-plugin-react-compiler'],
|
|
// },
|
|
}),
|
|
tailwindcss(),
|
|
wayfinder({
|
|
formVariants: true,
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'react': path.resolve(__dirname, 'node_modules/react'),
|
|
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
|
|
'@': path.resolve(__dirname, 'resources/js'),
|
|
},
|
|
},
|
|
optimizeDeps: {
|
|
include: ['react-number-format'],
|
|
},
|
|
});
|