Skip to content

CSS file paths in Vite 3 manifest broken on Windows #101

@AhsanAbrar

Description

@AhsanAbrar
  • Laravel Vite Plugin Version: 0.5.0
  • Laravel Version: 9.21.3
  • Node Version: 16.13.2
  • NPM Version: 8.1.2
  • Host operating system: Windows
  • Web Browser & Version: Chrome - Version 103.0.5060.134 (Official Build) (64-bit)
  • Running in Sail / Docker: No

Description:

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

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

After running this command:

npm run build

Getting this error:

Unable to locate file in Vite manifest: resources/css/app.css.

Steps To Reproduce:

I have done some research on it.

there is an issue in the manifest.json file.

{
  "resources/js/app.js": {
    "file": "assets/app.8fe7c9ab.js",
    "src": "resources/js/app.js",
    "isEntry": true
  },
  "resources/css\\app.css": {
    "file": "assets/app.8794147c.css",
    "src": "resources/css\\app.css"
  }
}

Screenshot_57

and in the Vite.php this manifest key is not matching.

Screenshot_58

that's why js files working fine and css files having issues.

please fix this, thanks.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions