Warning about preload not used because of script type mismatch #45
-
|
Is there any way to skip the preload tag generation? They just keep generating warnings in my app: A preload for 'http://ratel.arts.mun.ca:3000/vite-dev/admin/application.js' is found, but is not used because the script type does not match. Thanks for the gem! A |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi Allan! Preload tags can be disabled by passing Rails generates early preload hints incorrectly for I made a pull request to Rails fixing this, and it has been merged, but I'm not sure whether fixes are backported. To disable that warning, you could:
|
Beta Was this translation helpful? Give feedback.

Hi Allan!
Preload tags can be disabled by passing
skip_preload_tags: trueto thevite_javascript_taghelper. However, it seems like you are running into a different scenario.Rails generates early preload hints incorrectly for
type="module"scripts (usesrel=preloadinstead ofrel=modulepreload).I made a pull request to Rails fixing this, and it has been merged, but I'm not sure whether fixes are backported.
To disable that warning, you could:
javascript_include_tagmanually to include the fix (not ideal)config.action_view.preload_links_header = false