You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I originally posted an issue on the vite repo (vitejs/vite#13071) but upon further investigation I think it might be more relevant here.
We recently tried deploying our Rails7 + Vue 3 + Vite 4.2.0 (from Vite 2.9) update and since we have multiple app servers we noticed that when Capistrano ran precompile it generated two different hashes on different servers (and only two).
I reproduced this locally so it's not just an issue with our servers.
The difference between the files:
../../public/vite/assets/application-8f133cfb.js
nne = function (e) {
return "/vite/" + e;
},
../../public/vite/assets/application-06ecfed2.js
nne = function (e) {
return "https://xyz.cloudfront.net/vite/" + e;
},
It seems the first one 8f133cfb happened after the first build but re-running bundle exec vite build --force multiple times continually produced 06ecfed2 (with the proper CDN path).
Any ideas on why it might not be inserting the CDN the first time around?
We're attempting to try Vite 4.3.4 at the moment to see if it helps...
Based on the example you provided, and assuming you are configuring asset_host in Rails, you might want to check the build output to verify that it's not printing this error the first time.
To discard whether this is the problem, I'd suggest explicitly configuring VITE_RUBY_ASSET_HOST, and see whether that prevents the problem.
Description 📖
I originally posted an issue on the vite repo (vitejs/vite#13071) but upon further investigation I think it might be more relevant here.
We recently tried deploying our Rails7 + Vue 3 + Vite 4.2.0 (from Vite 2.9) update and since we have multiple app servers we noticed that when Capistrano ran precompile it generated two different hashes on different servers (and only two).
I reproduced this locally so it's not just an issue with our servers.
The difference between the files:
It seems the first one
8f133cfb
happened after the first build but re-runningbundle exec vite build --force
multiple times continually produced06ecfed2
(with the proper CDN path).Any ideas on why it might not be inserting the CDN the first time around?
We're attempting to try Vite 4.3.4 at the moment to see if it helps...
System info
package.json:
Gemfile.lock
The text was updated successfully, but these errors were encountered: