Laravel: Vite manifest not found at: /public/build/manifest.json

hello everyone, when you install laravel and install laravel breeze, and you found this bug  Vite manifest not found at: /public/build/manifest.json in your project, 

to fix this, you can follow step bellow:

Install with Laravel vite plugin

  1. you need install laravel-vite plugin in your project
  2. install with command:  npm install --save-dev vite laravel-vite-plugin
  3. update your package.json, substitute with "scripts": { "dev": "vite", "build": "vite build" }
  4. run npm development or npm build
  5. with command : npm run dev / npm run build

Modify asset @vite in layout/app.blade.php and guest.blade.php

by default laravel and laravel breeze build in mix js, you can this mix js to compile your asset if you don't to use vite in your project, you can follow step bellow:
  1. first, open the file app.blade.php and guest.blade.php in folder resources/view/layout
  2. by default, vite is config for your frontend compile your asset


  3. you can disable @vite(['resources/css/app.css', 'resources/js/app.js']), and substitute with the mix asset, you can see this image bellow




  4. after that, you can run npm run dev / npm run watch in your project to compile your asset, and refresh your browser.
  5. laravel breeze ready to use!
  6. happy coding
  7. share this tips to community


Artikel Terkait, Jangan Lupa Baca

loading...
Share:

No comments:

Post a Comment