Open Aryan3212 opened 2 years ago
For example; ../node_modules/foo
is the current place
package.json
file? - yes package.json
file contain a main
key/value pair? - yes
{
"name": "foo",
"main": "./lib.js"
// ...
}
Then 🎉 🎊
Does the second line here (4th in the book) imply foo/package.json?
It implies foo/(path in main field of package.json)
In this example, it implies foo/lib.js
.
https://basarat.gitbook.io/typescript/project/modules/external-modules#what-is-place
else if the place is a folder and there is a foo/package.json and a file specified in the types key in the package.json that exists, then hurray!
else if the place is a folder and there is a package.json and a file specified in the main key in the package.json that exists, then hurray!
Does the second line here (4th in the book) imply foo/package.json?