Skip to content

Commit

Permalink
Default to <script type="module"> in GOV.UK Prototype Kit
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Aug 22, 2023
1 parent 50a2824 commit c605a82
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ export default async () => {
},
assets: ['/dist/govuk/assets', '/dist/govuk/all.bundle.js.map'],
sass: ['/dist/govuk-prototype-kit/init.scss'],
scripts: ['/dist/govuk/all.bundle.js', '/dist/govuk-prototype-kit/init.js'],
scripts: [
{
path: '/dist/govuk/all.bundle.js',
type: 'module'
},
{
path: '/dist/govuk-prototype-kit/init.js',
type: 'module'
}
],
nunjucksMacros,
nunjucksPaths: ['/dist']
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ describe('GOV.UK Prototype Kit config', () => {
expect(config.sass).toEqual(['/dist/govuk-prototype-kit/init.scss'])

expect(config.scripts).toEqual([
'/dist/govuk/all.bundle.js',
'/dist/govuk-prototype-kit/init.js'
{
path: '/dist/govuk/all.bundle.js',
type: 'module'
},
{
path: '/dist/govuk-prototype-kit/init.js',
type: 'module'
}
])
})

Expand Down

0 comments on commit c605a82

Please sign in to comment.