Vite 5 compatibility

Created on 12 November 2023, 8 months ago
Updated 28 November 2023, 7 months ago

Problem/Motivation

Vite 5 changes the default location of generated manifest.json file. From `dist/manifest.json` to `dist/.vite/manifest.json`. https://github.com/vitejs/vite/pull/14230
Currently, when loading the manifest.json if the manifest path is not explicitly configured, a default value of `dist/manifest.json` is used. This will need to change for Vite 5.

Proposed resolution

Instead of statically using default path `dist/manifest.json`, check if `dist/manifest.json` file exists if so use it as a default value, if not use `dist/.vite/manifest.json`. This will add support for Vite 5 while providing backward compatibility with Vite 4.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡΅πŸ‡±Poland wotnak

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024