Skip to content

Commit 1c7a340

Browse files
authored
fix: JSON module should be marked as ESM type (#1434)
1 parent 44bc4bc commit 1c7a340

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared/utils/package-analysis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function analyzeExports(exports: PackageExports, depth = 0): ExportsAnalysis {
124124

125125
if (typeof exports === 'string') {
126126
// Check file extension for format hints
127-
if (exports.endsWith('.mjs') || exports.endsWith('.mts')) {
127+
if (exports.endsWith('.mjs') || exports.endsWith('.mts') || exports.endsWith('.json')) {
128128
result.hasImport = true
129129
} else if (exports.endsWith('.cjs') || exports.endsWith('.cts')) {
130130
result.hasRequire = true

0 commit comments

Comments
 (0)