Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
colinrotherham committed Jun 16, 2023
1 parent cedc1bb commit b9da2f0
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
@@ -17,7 +17,9 @@
"import": "./dist/govuk-esm/all.mjs",
"require": "./dist/govuk/all.js"
},
"./*": "./*"
"./*": "./*",
"./dist/": "./dist/",
"./package.json": "./package.json"
},
"sideEffects": [
"**/vendor/**"

0 comments on commit b9da2f0

Please sign in to comment.