@aniket_in While using Vite you have to use its own directive.
@vite(['resources/css/app.css'])
It will only work if you're reading assets from your resources directory.
Be part of JetBrains PHPverse 2026 on June 9 ā a free online event bringing PHP devs worldwide together.
Hi, š
I did a fresh installation of Laravel with Laravel Breeze (React) And installed Laravel passport. Now, when I was trying out Passport, I realized the assets are missing.
This is how the page is looking š¶ : https://prnt.sc/IhYJtQ28PuaR
I tried to publish the passport views with :
php artisan vendor:publish --tag=passport-views
I see, this is how the asset is included in authorize.blade.php
<!-- Styles -->
<link href="{{ asset('/css/app.css') }}" rel="stylesheet">
But I think, we have to do include it differently since latest laravel version is using Vite.
This is the vite.config.js file:
export default defineConfig({
plugins: [
laravel({
input: 'resources/js/app.jsx',
refresh: true,
}),
react(),
],
});
If anyone has any idea, how to do this.
Thank you so much in advance :)
@Aniket_IN Have you defined your input CSS files in the vite.config.js ?
export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.jsx'
],
refresh: true,
}),
react(),
],
});
Please or to participate in this conversation.