ElMassimo / vite_ruby

⚡️ Vite.js in Ruby, bringing joy to your JavaScript experience
https://vite-ruby.netlify.app/
MIT License
1.31k stars 121 forks source link

fix: enforce vite 5 manifest location #432

Closed KieranP closed 6 days ago

KieranP commented 8 months ago

Description 📖

This fixes an issue where upgrading to Vite5 was merging old Vite4 and Vite5 manifests together, creating JS errors.

Background 📜

This was happening because vite_ruby was merging vite4 and vite5 manifests together.

The Fix 🔨

Check for Vite5 manifests. If present, use those, otherwise fall back to Vite4 manifests.

Amends #420

rgioia commented 8 months ago

I'm going through the same problem.

emptyflask commented 7 months ago

I just upgraded to Vite 5 and am dealing with this now as well.

benlangfeld commented 3 months ago

Hey @ElMassimo , is there anything that needs to be done here before this can be merged?

sbastn commented 2 months ago

@ElMassimo we're eager to see this merged. Is there anything we can do to help?

benlangfeld commented 2 months ago

@ElMassimo Could this please be merged and included in the next release?

rmehner commented 2 months ago

Is there anything we can do to help with getting this released?

ggalmazor commented 1 month ago

HI @ElMassimo! I'm also offering my help to get this released as soon as possible.

ElMassimo commented 6 days ago

This should have shipped along 3.5.0, when we started enforcing:

  "vite": "~>5.0.0"

That means 3.5.0 would fail early if used with vite 4, prompting users to run bin/vite upgrade, which would install vite 5.

Any deployment that switches from vite 4 to vite 5 would modify package.json, so the last build would be stale, making it safe to assume the manifests will always be in the new location.