Skip to content

Commit

Permalink
Update govuk-frontend asset paths
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
patrickpatrickpatrick authored and MartinJJones committed May 31, 2024
1 parent cee6c9a commit b8bc429
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/assets/config/govuk_publishing_components_manifest.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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/
]

Expand Down

0 comments on commit b8bc429

Please sign in to comment.