From 8a38afe779ce71a10178ed62b13709d06adf7a66 Mon Sep 17 00:00:00 2001 From: kbayrhammer Date: Tue, 16 Mar 2021 16:52:47 +0100 Subject: [PATCH] docs(package-json): document default main behavior PR-URL: https://github.com/npm/cli/pull/2881 Credit: @klausbayrhammer Close: #2881 Reviewed-by: @wraithgar --- docs/content/configuring-npm/package-json.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/content/configuring-npm/package-json.md b/docs/content/configuring-npm/package-json.md index 9a4fd5f95d5b0..f3a186f436e02 100644 --- a/docs/content/configuring-npm/package-json.md +++ b/docs/content/configuring-npm/package-json.md @@ -325,6 +325,8 @@ This should be a module relative to the root of your package folder. For most modules, it makes the most sense to have a main script and often not much else. +If `main` is not set it defaults to `index.js` in the packages root folder. + ### browser If your module is meant to be used client-side the browser field should be