Search code examples
laravellaravel-livewirevitelaravel-jetstream

Laravel jetstream using vite


sorry in advance my english is bad

I have a problem when I will use laravel jetstream for my project. Because when i used stack livewire, the display doesn't match, here I give the output result enter image description here

And also I've run npm install & npm run dev so it will run development using mix as default Here I will give the project folder structure enter image description here

maybe what I can conclude is to change the development process from mix to vite, or there are hints from the experts here on how to solve the problem?. Thank you in advance


Solution

  • Actually you can fix this issue by replacing the @vite with these one in views/layouts/app and guest blade.

    <!-- Styles -->
    <link rel="stylesheet" href="{{ mix('css/app.css') }}">
    
    <!-- Scripts -->
    <script src="{{ mix('js/app.js') }}" defer></script>