faizH3 wrote a reply+100 XP
5mos ago
Hi, I'm also experiencing this issue. I built a project using React Starterkit.
For now, I've added a comment in vite.config.ts:
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';
export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.tsx'],
ssr: 'resources/js/ssr.tsx',
refresh: true,
}),
react({
babel: {
plugins: ['babel-plugin-react-compiler'],
},
}),
tailwindcss(),
//////// here ///////////
// wayfinder({
// formVariants: true,
// }),
],
esbuild: {
jsx: 'automatic',
},
});
Then run php artisan serve && npm run dev. This worked for me.
faizH3 liked a comment+100 XP
5mos ago
Hi, when building with Vite I get the following message:
error during build: [@laravel/vite-plugin-wayfinder] [plugin @laravel/vite-plugin-wayfinder] Error generating types: Error: Command failed: php artisan wayfinder:generate --with-form
And that's only at the dev server. When I try the same on the release, everything runs smooth.
I've tried comparing the composer.lock files on the remote and the dev, but they are identical as expected.