You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using moj-frontend with the GOV.UK Prototype Kit, remote images are not correctly loaded (on Filter a liist, Timeline, and Button menu). This is because the generated path (/assets/images/...) is not served by the Prototype Kit. Instead, the correct path is $govuk-extensions-url-context + "/%40ministryofjustice%2Ffrontend/moj/assets/" (NB: symbols in NPM package name must be URL-encoded).
Steps to Reproduce
Set up a prototype (npx govuk-prototype-kit@latest create)
Description
When using moj-frontend with the GOV.UK Prototype Kit, remote images are not correctly loaded (on Filter a liist, Timeline, and Button menu). This is because the generated path (
/assets/images/...
) is not served by the Prototype Kit. Instead, the correct path is$govuk-extensions-url-context + "/%40ministryofjustice%2Ffrontend/moj/assets/"
(NB: symbols in NPM package name must be URL-encoded).Steps to Reproduce
npx govuk-prototype-kit@latest create
)npm install @ministryofjustice/frontend --save
)npm run dev
)Expected behaviour: Images should be loaded from remote paths
Actual behaviour: The image requests 404 and aren't loaded
Reproduces how often: 100%
Versions
Prototype Kit: 13.16.0
moj-frontend: 2.0.0
Additional Information
This could be fixed by updating the Sass to:
But doing so in the distributed file might have unintended side effects, so it would be preferable to provide a separate entrypoint for prototypes.
The text was updated successfully, but these errors were encountered: