Fix Vite manifest paths in CI with custom normalization plugin (#285)

Commit: cf95ff130a9fa4959b64d74f1d0232548c199767
Date: 2025-09-02 22:18:50 +0200
Author: PascalHavelange

Commit Message

Fix Vite manifest paths in CI with custom normalization plugin (#285)

# Fix Vite manifest paths in CI with custom normalization plugin

## Summary
Add a custom Vite plugin to normalize manifest.json paths, ensuring consistent relative paths regardless of build environment.

## Problem
In GitHub Actions CI environment, the manifest.json was generating absolute paths:
```json
{
  "../../../../actions-runner-win-x64-2.328.0/_work/inventory-app/inventory-app/resources/css/app.css": {
    "file": "assets/app-YzGMk8if.css",
    "src": "../../../../actions-runner-win-x64-2.328.0/_work/inventory-app/inventory-app/resources/css/app.css"
  }
}

Solution

Implemented a custom Vite plugin normalize-manifest-paths that:

Result

Manifest now consistently shows relative paths in all environments:

{
  "resources/css/app.css": {
    "file": "assets/app-YzGMk8if.css",
    "src": "resources/css/app.css"
  }
}

Testing

This fix ensures Laravelโ€™s asset helper functions work correctly regardless of build environment.

Co-authored-by: Pascal HAVELANGE havelangep@hotmail.com ```

Files Changed


This documentation was automatically generated from Git commit data.