From e154f88eb826e58ae443690e2b076b7f29d99480 Mon Sep 17 00:00:00 2001 From: AshGDS <8880610+AshGDS@users.noreply.github.com> Date: Thu, 5 Sep 2024 11:35:56 +0100 Subject: [PATCH] Move es6-components.js back into application.js --- app/assets/config/manifest.js | 1 - app/assets/javascripts/application.js | 3 +++ app/assets/javascripts/es6-components.js | 12 ------------ app/views/layouts/application.html.erb | 1 - 4 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 app/assets/javascripts/es6-components.js diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 7cb2ec743..1b6313e59 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,5 +1,4 @@ //= link_tree ../images //= link application.js -//= link es6-components.js //= link webchat.js //= link_tree ../builds diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index c55407266..4af9e3356 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1,9 +1,12 @@ //= require govuk_publishing_components/lib +//= require govuk_publishing_components/components/accordion +//= require govuk_publishing_components/components/error-summary //= require govuk_publishing_components/components/govspeak //= require govuk_publishing_components/components/image-card //= require govuk_publishing_components/components/intervention //= require govuk_publishing_components/components/metadata //= require govuk_publishing_components/components/print-link +//= require govuk_publishing_components/components/radio //= require govuk_publishing_components/components/single-page-notification-button //= require govuk_publishing_components/components/step-by-step-nav diff --git a/app/assets/javascripts/es6-components.js b/app/assets/javascripts/es6-components.js deleted file mode 100644 index d5bc4c711..000000000 --- a/app/assets/javascripts/es6-components.js +++ /dev/null @@ -1,12 +0,0 @@ -// These modules from govuk_publishing_components -// depend on govuk-frontend modules. govuk-frontend -// now targets browsers that support `type="module"`. -// -// To gracefully prevent execution of these scripts -// on browsers that don't support ES6, this script -// should be included in a `type="module"` script tag -// which will ensure they are never loaded. - -//= require govuk_publishing_components/components/accordion -//= require govuk_publishing_components/components/error-summary -//= require govuk_publishing_components/components/radio diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 4529560b7..08d26f152 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -53,7 +53,6 @@ <%= stylesheet_link_tag "application", :media => "all", integrity: false %> <%= javascript_include_tag "application", integrity: false, type: "module" %> - <%= javascript_include_tag 'es6-components', type: "module" %> <%= csrf_meta_tags %> <%= render 'govuk_publishing_components/components/meta_tags', content_item: @content_item.content_item %>