diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 0bd8848b46..d17ad8876e 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,5 +1,4 @@ //= link_tree ../images -//= link es6-components.js //= link application.js //= link main.js //= link dependencies.js diff --git a/app/assets/javascripts/dependencies.js b/app/assets/javascripts/dependencies.js index febf992904..6c8378d368 100644 --- a/app/assets/javascripts/dependencies.js +++ b/app/assets/javascripts/dependencies.js @@ -1,7 +1,10 @@ // This file contains the dependencies required by the application. //= require govuk_publishing_components/lib +//= 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/radio //= require govuk_publishing_components/components/step-by-step-nav //= require govuk_publishing_components/components/table +//= require govuk_publishing_components/components/tabs diff --git a/app/assets/javascripts/es6-components.js b/app/assets/javascripts/es6-components.js deleted file mode 100644 index 72a56f82f1..0000000000 --- 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/error-summary -//= require govuk_publishing_components/components/radio -//= require govuk_publishing_components/components/tabs diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 66338e6372..a1fa282d02 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -42,7 +42,7 @@ <%= javascript_include_tag 'test-dependencies.js', type: "module" if Rails.env.test? %> <%= javascript_include_tag 'application.js', integrity: false, type: "module" %> - <%= javascript_include_tag 'es6-components.js', type: "module" %> + <%= yield :extra_javascript %> <%= yield :extra_headers %> <% if content_item_hash %>