Skip to content

Commit

Permalink
Fix package.json exports for Node.js <= 12.18
Browse files Browse the repository at this point in the history
We switched to “subpath patterns” recently (supported in Node.js 12.20+) but hadn’t realised that “subpath exports” with trailing slashes (not asterisks) were still needed for older versions

We need both flavours because trailing slashes in exports were deprecated in Node.js 16
https://nodejs.org/docs/latest-v18.x/api/deprecations.html#dep0148-folder-mappings-in-exports-trailing-

Fixes: #3755
  • Loading branch information
colinrotherham authored and querkmachine committed Jun 23, 2023
1 parent 464a136 commit 7b6aebc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/govuk-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"import": "./dist/govuk-esm/all.mjs",
"require": "./dist/govuk/all.js"
},
"./*": "./*"
"./*": "./*",
"./dist/": "./dist/",
"./govuk-prototype-kit.config.json": "./govuk-prototype-kit.config.json",
"./package.json": "./package.json"
},
"sideEffects": [
"**/vendor/**"
Expand Down

0 comments on commit 7b6aebc

Please sign in to comment.