From 7df2561fd7988993c19ed98649e11b79799f047f Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Tue, 12 Dec 2023 09:22:35 +0000 Subject: [PATCH] Update GOV.UK Frontend assets path There's now a dist directory. --- app/assets/stylesheets/application.sass.scss | 2 +- config/application.rb | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/application.sass.scss b/app/assets/stylesheets/application.sass.scss index af652dc58a..eb30b93f04 100644 --- a/app/assets/stylesheets/application.sass.scss +++ b/app/assets/stylesheets/application.sass.scss @@ -3,7 +3,7 @@ $govuk-new-link-styles: true; $govuk-assets-path: "/"; $moj-images-path: "/"; -@import "govuk-frontend/govuk/all"; +@import "govuk-frontend/dist/govuk/all"; @import "@ministryofjustice/frontend/moj/components/ticket-panel/ticket-panel"; @import "@ministryofjustice/frontend/moj/components/timeline/timeline"; @import "dfe-autocomplete/src/dfe-autocomplete"; diff --git a/config/application.rb b/config/application.rb index 4af5119943..ebcf26ed94 100644 --- a/config/application.rb +++ b/config/application.rb @@ -39,9 +39,12 @@ class Application < Rails::Application config.exceptions_app = routes - config.assets.paths << Rails.root.join( - "node_modules/govuk-frontend/govuk/assets", - ) + config.assets.paths += + %w[ + node_modules/govuk-frontend/dist/govuk/assets + node_modules/govuk-frontend/dist/govuk/assets/images + node_modules/govuk-frontend/dist/govuk/assets/fonts + ].map { |path| Rails.root.join(path) } config.action_dispatch.rescue_responses[ "Pundit::NotAuthorizedError"