-
Notifications
You must be signed in to change notification settings - Fork 0
Consider how govuk-frontend JS is imported and used to avoid bloated bundles #112
Comments
I would really like the original js included in the npm package along with the bundled versions 🙏. |
@gunjam Out of curiosity are you using govuk-react-jsx? Or have you reached this ticket because I linked to it from that ticket in govuk-frontend? I might add the original JS to this package if it ends up being the right solution for the needs of govuk-react-jsx, but I don't think it would be wise for anyone to reference the govuk-frontend JS contained in govuk-react-jsx unless you were using govuk-react-jsx itself. That's not a use case I can support as I wouldn't like to guarantee that I wouldn't remove it in future. |
Yeah sorry I ended up here because I clicked an issue mention on govuk-frontend and didn't realise I'd changed repos! Sorry 😅 |
Haha don't worry! Thanks for bringing the issue to my attention though - it was your tickets on govuk-frontend that made me investigate it here... |
govuk-frontend JS is currently being imported from the npm module but as per alphagov/govuk-frontend#711 there are issues with this - it results (I think) in duplicated polyfills.
Current "solution" is to bundle from source. Perhaps by copying the govuk-frontend JS into this package at build time?
The text was updated successfully, but these errors were encountered: