We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 417bcf3 commit 404a15aCopy full SHA for 404a15a
1 file changed
vite_rails/lib/vite_rails/tag_helpers.rb
@@ -3,10 +3,10 @@
3
# Public: Allows to render HTML tags for scripts and styles processed by Vite.
4
module ViteRails::TagHelpers
5
# Public: Renders a script tag for vite/client to enable HMR in development.
6
- def vite_client_tag(**options)
+ def vite_client_tag(crossorigin: 'anonymous', **options)
7
return unless src = vite_manifest.vite_client_src
8
9
- javascript_include_tag(src, type: 'module', extname: false, **options)
+ javascript_include_tag(src, type: 'module', extname: false, crossorigin: crossorigin, **options)
10
end
11
12
# Public: Renders a script tag to enable HMR with React Refresh.
0 commit comments