Fix Vite manifest path normalization in CI/CD pipeline (#286)

Commit: 0aadd089837ae77549d909231f49af2302025238
Date: 2025-09-02 22:41:03 +0200
Author: PascalHavelange

Commit Message

Fix Vite manifest path normalization in CI/CD pipeline (#286)

# Fix Vite manifest path normalization in CI/CD pipeline

## Problem
The Vite manifest.json file was generating absolute paths in the GitHub Actions pipeline instead of relative paths, causing issues with asset loading. The paths included the full runner directory structure like:

../../../../actions-runner-win-x64-2.328.0/_work/inventory-app/inventory-app/resources/css/app.css


## Solution
Enhanced the normalize-manifest-paths plugin in vite.config.js to:
- Use `lastIndexOf()` to find the last occurrence of 'resources/' in paths
- Handle both Unix forward slashes and Windows backslashes
- Extract everything from 'resources/' onwards using `substring()`
- Normalize both manifest keys and src properties
- Convert Windows backslashes to forward slashes for consistency

## Result
Manifest paths are now properly normalized to:
- `resources/css/app.css`
- `resources/js/app.ts`

This ensures consistent asset loading across local development and CI/CD environments.

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

Files Changed


This documentation was automatically generated from Git commit data.