TLDR; 5800ms (Laravel Mix) to 224ms (Vite⚡️) on hot-reload!
We’ve been using Laravel-Mix for years and it’s been doing pretty good. However, recen...
For further actions, you may consider blocking this person and/or reporting abuse
Greetings
I created a new project based on this guide sebastiandedeyne.com/vite-with-lar...
Unfortunately there is no detailed explanation in the manual (last part) about inertia with react,
And I can in no way arrange between them, it already seems that everything works but this error returns:
You can check out the project here: github.com/sbc640964/laravel-vite-...
unable to add flowbite in my project
added this in tailwind.config.js
in app.js
this is not working!
Also i am adding Vue plugins like this:
it is working fine but is it right way to add plugins. In previous version it was Vue.use(FilePond); // not working in vue 3
Great that more and more people are using Vite. If you want to get rid of some extra code then have look at my blade file github.com/kristjanjansen/newstack...
Good idea, but I wanted to have flexibility for running
npm run prod
andnpm run hot
simultaneously in my local. And I didn't want to have that logic in my blade. If you don't need much logic code, it's ideal to place it in blade indeed.I got this error while following this article, any ideas? I started the app with 'npm run dev' and got this:
'printf' is not recognized as an internal or external command,
If anyone is running npm in command prompt, change script in package.json to this:
Because 'echo' adds a newline at the end of the file you also need to change vite.php this line:
$devServerIsRunning = str_contains(file_get_contents(public_path('hot')), 'dev');
Yeah, that was the reason I used printf instead of echo
after this inertia-link stops working as the are not render as a tag on the browser
It shouldn't be happening - we built a whole app with inertia and vite and it works like charm
Does anyone get the error
I can't seem to find the fix for this.
Probably too late for this answer to be directly useful but answering in case anyone else is googling: unless you have to support older browsers (IE11 for example) then it's safe to just delete the import from your app.js file.
The import is only there to add polyfill support for es6 modules and I suspect vite removed it.
If you need it back, take a look at the legacy plugin: github.com/vitejs/vite/tree/main/p...
You'll have to reconfigure the import, and change some settings depending on your specific support needs.
But if you don't need to support legacy browsers, easiest fix is just delete the line and don't worry about it :)