We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
.json
1 parent 4df8d48 commit 3c677bcCopy full SHA for 3c677bc
src/node/core/pkg/parseExports.ts
@@ -163,7 +163,10 @@ export function parseExports(options: {
163
}
164
165
for (const [exportPath, exportEntry] of Object.entries(pkg.exports)) {
166
- if (exportPath.endsWith('.json')) {
+ if (
167
+ exportPath.endsWith('.json') ||
168
+ (typeof exportEntry === 'string' && exportEntry.endsWith('.json'))
169
+ ) {
170
if (exportPath === './package.json') {
171
if (exportEntry !== './package.json') {
172
errors.push('package.json: `exports["./package.json"] must be "./package.json".')
0 commit comments