application.js is loading twice in Firefox #209
-
I initialized a new project with vue2 and composition api and pinia instead of vuex , I also used your other helpful package to generate js apis from rails routes. It doesn't break anything , but can you think of anything that could be causing this. I also noticed only in this app , there are multiple requests(two) to This is a brand new project with vite_ruby , as opposed to other projects which i migrated from webpacker to vite. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Rachit! If it only happens in Firefox it might be related to vitejs/vite#5532. If The warning about a preloaded resource is likely caused by the previous Loading failed warning. |
Beta Was this translation helpful? Give feedback.
Hi Rachit!
If it only happens in Firefox it might be related to vitejs/vite#5532.
If
application.js
is being requested twice, it's probably related to the setup.Check that you are not accidentally injecting
vite_javascript_tag
several times in different partials/layouts, or look at each request in the inspector to find the initiator in the Network tab.The warning about a preloaded resource is likely caused by the previous Loading failed warning.
You might want to verify that the CSP settings in Rails are not as strict during development, as that could be blocking the JS from being loaded.