Skip to content

Commit

Permalink
Add to Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanita Barrett committed Nov 12, 2021
1 parent 8cc158c commit 3e3025b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,26 @@ Replace any use of this class with the `govuk-tag--grey` class.

This change was introduced in [pull request #2417: Remove deprecated `govuk-tag--inactive class`](https://github.com/alphagov/govuk-frontend/pull/2417).

#### Component JavaScript modules have a unique name when imported individually

We've changed the naming of our component JavaScript modules so that individual imports are now attached to
`window.GOVUKFrontend.[ComponentName]` instead of `window.GOVUKFrontend`.

This means you can now import multiple modules without overwriting the previous one, for example:

```
//= require govuk/components/accordion/accordion.js
//= require govuk/components/button/button.js
# The above are available under window.GOVUKFrontend.Accordion and window.GOVUKFrontend.Button respectively
```

If you are importing indvidual component JavaScript, you should check any references to `window.GOVUKFrontend` in your code and update them to point to the correct component: `window.GOVUKFrontend.[ComponentName]`. You may have implemented workarounds that can now be removed.

This change does not affect you if you followed our [Getting Started guide](https://frontend.design-system.service.gov.uk/get-started/#5-get-the-javascript-working) and are importing all of the GOV.UK Frontend JavaScript in one go via `all.js`, or if you installed GOV.UK Frontend using precompiled files.

This change was introduced in [pull request #1836: Rename exported JavaScript modules to include component name](https://github.com/alphagov/govuk-frontend/issues/1836)]

### Fixes

We’ve made fixes to GOV.UK Frontend in the following pull requests:
Expand Down

0 comments on commit 3e3025b

Please sign in to comment.