Skip to content

Commit

Permalink
Fix package.json exports for Node.js < 12.20
Browse files Browse the repository at this point in the history
We switched to “subpath patterns” recently (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 committed Jun 15, 2023
1 parent 6374763 commit ee51cca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/govuk-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"import": "./dist/govuk-esm/all.mjs",
"require": "./dist/govuk/all.js"
},
"./*": "./*"
"./*": "./*",
"./dist/": "./dist/",
"./package.json": "./package.json"
},
"sideEffects": [
"**/vendor/**"
Expand Down

0 comments on commit ee51cca

Please sign in to comment.