New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Vite4 or Vite5 manifests, not both #432
base: main
Are you sure you want to change the base?
Conversation
I'm going through the same problem. |
I just upgraded to Vite 5 and am dealing with this now as well. |
vite_ruby/lib/vite_ruby/config.rb
Outdated
] | ||
|
||
vite5_manifest_paths = manifest_files.map do |path| | ||
build_output_dir.join(".vite/#{path}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build_output_dir.join(".vite/#{path}") | |
build_output_dir.join(".vite/#{ path }") |
Looks like this repo's RuboCop config wants us to do this. (RuboCop docs)
Lines 72 to 73 in 369facf
Layout/SpaceInsideStringInterpolation: | |
EnforcedStyle: space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @KieranP, any chance we can get this PR fixed up and rebased? Would be nice to have it ready so it can be merged so it's in the next release, whenever that is. 🙏 🙇♂️
Don't want to keep production application on cherry-picked fix branch long term. 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@larouxn Done and done
This fixes an issue where upgrading to Vite5 was merging old Vite4 and Vite5 manifests together, creating JS errors.
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