We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
resolveEntry
1 parent 31805a1 commit 1a7cbe9Copy full SHA for 1a7cbe9
1 file changed
server/build_resolver.go
@@ -314,6 +314,18 @@ func (ctx *BuildContext) resolveEntry(esm EsmPath) (entry BuildEntry) {
314
}
315
*/
316
exportEntry = ctx.resolveConditionExportEntry(obj, pkgJson.Type)
317
+ } else if arr, ok := v.([]any); ok {
318
+ /**
319
+ exports: {
320
+ ".": ["./cjs/index.js", "./esm/index.js"]
321
+ }
322
+ */
323
+ a0 := arr[0]
324
+ if s, ok := a0.(string); ok {
325
+ exportEntry.update(s, pkgJson.Type == "module")
326
+ } else if obj, ok := a0.(npm.JSONObject); ok {
327
+ exportEntry = ctx.resolveConditionExportEntry(obj, pkgJson.Type)
328
329
330
} else {
331
/**
0 commit comments