Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up how our sass and js is imported #3807

Merged
merged 2 commits into from
May 20, 2024
Merged

Conversation

owenatgov
Copy link
Contributor

What

Makes 3 changes across our sass and js importing and initialisation:

  1. Removes the workaround to issues with our treeshaking introduced in Only import the js from GOV.UK Frontend that the website is using #3766 now that Fix tree-shaking when importing from 'govuk-frontend' govuk-frontend#4957 is resolved and published
  2. Uses the createAll method to initialise our js following it's introduction in Move responsibilities from initAll to the components govuk-frontend#4945
  3. Removes all from the sass import paths as per the changes in Rename any _all.scss files to _index.scss so they work as index files govuk-frontend#4960

Why

This is a redux of #3732 following all the work done via #3731 in the last cycle.

Notes

There are no changes in file size for compiled js and css assets between main and this branch. The primary benefit is that the build now no longer spits out a bunch of sass warnings and our imports are a bit neater.

Also undoes the direct import workaround from 0513721
We deprecated this feature in 5.4.0 so this change silences warnings
@owenatgov owenatgov requested a review from a team May 20, 2024 09:28
Copy link

netlify bot commented May 20, 2024

You can preview this change here:

Name Link
🔨 Latest commit 373063d
🔍 Latest deploy log https://app.netlify.com/sites/govuk-design-system-preview/deploys/664b17d289fd5c000886bcdd
😎 Deploy Preview https://deploy-preview-3807--govuk-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@36degrees 36degrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely stuff, thanks for doing this 🙌🏻

@owenatgov owenatgov merged commit 836e46e into main May 20, 2024
13 checks passed
@owenatgov owenatgov deleted the apply-frontend-optimisations branch May 20, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants