Module Resolution Algorithm
0 questions
How require('x') becomes a file path: the core-module check, relative files with extension guessing, a directory's package main or index.js, then the walk up through node_modules. Asked because 'why is this resolving to a different copy of the package' is a real debugging session, made worse by symlinks and monorepo layouts.
questions
0 questions