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 committed Jun 19, 2023
1 parent 2aafdf4 commit 10a6ebe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion 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 10a6ebe

Please sign in to comment.