Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaScriptES module resolution algorithmSingle-choice MCQ

Given Node's ESM resolution algorithm with package `exports`, how is a bare specifier subpath like `import x from 'pkg/feature'` resolved when the package defines conditional exports?

// node_modules/pkg/package.json { "exports": { "./feature": { "import": "./esm/feature.js", "require": "./cjs/feature.js", "default": "./fallback.js" } } }