mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
The JS for GOVUKFrontend components is available individually so you can only include what you need: https://github.com/alphagov/govuk-frontend/blob/v2.13.0/docs/installation/installing-with-npm.md#option-2-import-javascript This uses the JS Modules syntax: *[JS module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) Our JS is delivered as one file so we need to use a bundler to convert the modules to a single file. This adds a build step to transpile all modules into a single file, which is then added to the files combined into the one that get delivered. Rollup is used as the simplest bundler to use for this purpose. It also introduces the least boilerplate JS. Note: the CommonJS plugin is needed as GOV.UK Frontend components are published as UMD modules. In future, this work should let us work on this story dependencies: https://www.pivotaltracker.com/story/show/165380360