Bob Rockefeller
Bob Rockefeller

Reputation: 4596

Vite manifest not found at: /css/custom.css/manifest.json

On my host website after building for production Larevel 11 throws an error Vite manifest not found at: /xxxx/xxxxxx.xxxxxxxxx.xx/laravel.xxxxx.xxxxxxx.xx/public/resources/css/custom.css/manifest.json which just seems crazy. Looking for a manifest in a directory below the css file?

The vite directive my the blade file is @vite("resources/js/app.js", "resources/css/custom.css")

My vite configuration is:

import { defineConfig } from "vite";
import laravel from "laravel-vite-plugin";

export default defineConfig({
  plugins: [
    laravel({
      input: [
        "resources/css/app.css",
        "resources/js/app.js",
        "resources/css/custom.css",
      ],
      refresh: true,
    }),
  ],
});

Has anyone seen this or have a clue what I need to be looking for?

Upvotes: 0

Views: 44

Answers (2)

Mouad
Mouad

Reputation: 26

just change @vite("resources/js/app.js", "resources/css/custom.css") to @vite(["resources/js/app.js", "resources/css/custom.css"]) and run "npm run build" and it becomes fine

Upvotes: 1

Bob Rockefeller
Bob Rockefeller

Reputation: 4596

OK, sorry for wasting your time. I don't read very well, I guess.

The @vite syntax should have been @vite(["resources/js/app.js", "resources/css/custom.css"]).

Problem solved. May this will help someone else who didn't read closely enough.

Upvotes: 1

Related Questions