From 2ffd57b0cc753eb7b3a57fed2f61882c48dc6f24 Mon Sep 17 00:00:00 2001 From: AshGDS <8880610+AshGDS@users.noreply.github.com> Date: Wed, 17 Jul 2024 15:36:39 +0100 Subject: [PATCH 1/3] Use type=module for application.js --- app/views/layouts/application.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 44a026c174e..429fcf7415f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -28,7 +28,7 @@ <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "test-dependencies" if Rails.env.test? %> <%= javascript_include_tag "es6-components", type: "module" %> - <%= javascript_include_tag "application", defer: true %> + <%= javascript_include_tag "application", defer: true, type: "module" %> <%= yield :head %> <% if content_item %> <%= render "govuk_publishing_components/components/meta_tags", From 83ea9fe307edc1fa8631ccd6df54421efaf8950e Mon Sep 17 00:00:00 2001 From: AshGDS <8880610+AshGDS@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:25:55 +0100 Subject: [PATCH 2/3] Add type=module to test-dependencies.js --- app/views/layouts/application.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 429fcf7415f..79b7bbb250a 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -26,7 +26,7 @@ <%= csrf_meta_tags %> <%= csp_meta_tag %> <%= stylesheet_link_tag "application", :media => "all" %> - <%= javascript_include_tag "test-dependencies" if Rails.env.test? %> + <%= javascript_include_tag "test-dependencies", type: "module" if Rails.env.test? %> <%= javascript_include_tag "es6-components", type: "module" %> <%= javascript_include_tag "application", defer: true, type: "module" %> <%= yield :head %> From 23d0e89b4e4ba066ba8c03dbf368c37ad55559e1 Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Thu, 15 Aug 2024 16:50:36 +0100 Subject: [PATCH 3/3] Bump to latest components gem --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d004ed1b197..f0b9619dcff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -194,7 +194,7 @@ GEM govuk_personalisation (0.16.0) plek (>= 1.9.0) rails (>= 6, < 8) - govuk_publishing_components (41.1.1) + govuk_publishing_components (42.0.0) govuk_app_config govuk_personalisation (>= 0.7.0) kramdown