Skip to content

Commit

Permalink
Fix package.json exports for Node.js >= 17
Browse files Browse the repository at this point in the history
We hadn’t realised that support for “subpath exports” with trailing slashes (not asterisks) was deprecated in Node.js 16 and removed in Node.js 17 https://nodejs.org/docs/latest-v18.x/api/deprecations.html#dep0148-folder-mappings-in-exports-trailing-

But fully switching to “subpath patterns” requires Node.js 12.20+ so both flavours will be needed for backwards compatibility

Fixes: #3755
  • Loading branch information
colinrotherham committed Jun 16, 2023
1 parent 190dc27 commit aab3033
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"require": "./govuk/all.js"
},
"./govuk/": "./govuk/",
"./govuk/*": "./govuk/*",
"./govuk-esm/": "./govuk-esm/",
"./govuk-esm/*": "./govuk-esm/*",
"./package.json": "./package.json"
},
"sideEffects": [
Expand Down

0 comments on commit aab3033

Please sign in to comment.