Skip to content

Commit

Permalink
Merge pull request #1265 from alphagov/fix-fe
Browse files Browse the repository at this point in the history
Fix Javascript issue with Publishing Components v40
  • Loading branch information
csutter authored Jul 25, 2024
2 parents f92fc74 + 17bc1e1 commit 6e39827
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
//= link_tree ../builds
//= link application.js
//= link es6-components.js
//= link_directory ../javascripts .js
4 changes: 1 addition & 3 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
// This file is required to exist by GOV.UK Publishing Components `layout_for_admin` component but
// currently doesn't need to contain any code. See `es6-components.js` where component JS is
// included.
//= require govuk_publishing_components/dependencies
1 change: 0 additions & 1 deletion app/assets/javascripts/es6-components.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//= require govuk_publishing_components/lib
//= require govuk_publishing_components/components/button
//= require govuk_publishing_components/components/checkboxes
//= require govuk_publishing_components/components/error-summary
Expand Down
4 changes: 4 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
# Ensure latest assets are always available when using Dart SASS in watch mode
config.assets.digest = false

# Enable source maps for Javascript and force all non-digested Javascript assets to be served with
# non-cache headers
config.assets.debug = true

# Force all the stylesheets from the `govuk_publishing_components` gem to be included in Dart Sass
# builds so we can use the component guide (without this, Sprockets will try and use the legacy
# SassC compiler to build them which we no longer include in this app)
Expand Down
1 change: 1 addition & 0 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
Rails.application.config.assets.precompile += %w[es6-components.js]

0 comments on commit 6e39827

Please sign in to comment.