diff --git a/Gemfile b/Gemfile index 2e1e3ec14..ddc75e461 100644 --- a/Gemfile +++ b/Gemfile @@ -65,6 +65,8 @@ gem 'dotenv-rails', '>= 3.0.0' gem 'foreman' gem 'puma' gem 'vite_rails' +# for legacy no cors support +gem 'vite_plugin_legacy' # metrics on heroku gem 'barnes' diff --git a/Gemfile.lock b/Gemfile.lock index f54a20aaa..357f90d57 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -798,6 +798,8 @@ GEM activemodel (>= 3.2) mail (~> 2.5) version_gem (1.1.4) + vite_plugin_legacy (3.0.2) + vite_ruby (~> 3.0, >= 3.0.4) vite_rails (3.0.17) railties (>= 5.1, < 8) vite_ruby (~> 3.0, >= 3.2.2) @@ -959,6 +961,7 @@ DEPENDENCIES tzinfo-data uglifier valid_email2 + vite_plugin_legacy vite_rails web-console (>= 4.2.1) web-push (>= 3.0.1) diff --git a/app/views/installation/onboarding/index.html.erb b/app/views/installation/onboarding/index.html.erb index d99ec6a73..2a32e5a6c 100644 --- a/app/views/installation/onboarding/index.html.erb +++ b/app/views/installation/onboarding/index.html.erb @@ -3,7 +3,7 @@ SuperAdmin | Chatwoot <%= vite_client_tag %> - <%= vite_javascript_tag 'superadmin', crossorigin: "use-credentials" %> + <%= vite_javascript_tag 'superadmin', crossorigin: nil %>
@@ -73,5 +73,6 @@ <% end %>
+ <%= vite_legacy_javascript_tag 'superadmin' %> diff --git a/app/views/layouts/portal.html.erb b/app/views/layouts/portal.html.erb index bdc24660d..ab75689ea 100644 --- a/app/views/layouts/portal.html.erb +++ b/app/views/layouts/portal.html.erb @@ -22,7 +22,7 @@ By default, it renders: <%= vite_client_tag %> - <%= vite_javascript_tag 'portal', crossorigin: "use-credentials" %> + <%= vite_javascript_tag 'portal', crossorigin: nil %>