From b8bc429a0691c28c1d784570af273ef93704a7fa Mon Sep 17 00:00:00 2001 From: Patrick Cartlidge Date: Mon, 6 Nov 2023 13:44:35 +0000 Subject: [PATCH] Update govuk-frontend asset paths In govuk-frontend v5 the asset path has changed from: `govuk-frontend/govuk/` to `govuk-frontend/govuk/dist` so we have to change references to the old path. --- app/assets/config/govuk_publishing_components_manifest.js | 4 ++-- .../govuk_publishing_components_sassc-rails_manifest.js | 4 ++-- config/initializers/assets.rb | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/config/govuk_publishing_components_manifest.js b/app/assets/config/govuk_publishing_components_manifest.js index 2fe27c8045..59491a681e 100644 --- a/app/assets/config/govuk_publishing_components_manifest.js +++ b/app/assets/config/govuk_publishing_components_manifest.js @@ -1,7 +1,7 @@ // Pre-compile image and font assets from here and govuk-frontend //= link_tree ../images -//= link_tree ../../../node_modules/govuk-frontend/govuk/assets/images -//= link_tree ../../../node_modules/govuk-frontend/govuk/assets/fonts +//= link_tree ../../../node_modules/govuk-frontend/dist/govuk/assets/images +//= link_tree ../../../node_modules/govuk-frontend/dist/govuk/assets/fonts // Create asset files of each of the files in these directory //= link_directory ../javascripts/component_guide diff --git a/app/assets/config/govuk_publishing_components_sassc-rails_manifest.js b/app/assets/config/govuk_publishing_components_sassc-rails_manifest.js index e738d35d46..c8a4559df8 100644 --- a/app/assets/config/govuk_publishing_components_sassc-rails_manifest.js +++ b/app/assets/config/govuk_publishing_components_sassc-rails_manifest.js @@ -1,7 +1,7 @@ // Pre-compile image and font assets from here and govuk-frontend //= link_tree ../images -//= link_tree ../../../node_modules/govuk-frontend/govuk/assets/images -//= link_tree ../../../node_modules/govuk-frontend/govuk/assets/fonts +//= link_tree ../../../node_modules/govuk-frontend/dist/govuk/assets/images +//= link_tree ../../../node_modules/govuk-frontend/dist/govuk/assets/fonts // Create asset files of each of the files in these directory //= link_directory ../javascripts/component_guide diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 0ca834bf6c..26d1aa001e 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -16,9 +16,9 @@ end Rails.application.config.assets.paths += %W[ - #{__dir__}/../../node_modules/govuk-frontend/govuk/assets/images - #{__dir__}/../../node_modules/govuk-frontend/govuk/assets/fonts - #{__dir__}/../../node_modules/govuk-frontend/ + #{__dir__}/../../node_modules/govuk-frontend/dist/govuk/assets/images + #{__dir__}/../../node_modules/govuk-frontend/dist/govuk/assets/fonts + #{__dir__}/../../node_modules/govuk-frontend/dist #{__dir__}/../../node_modules/ ]