Skip to content

Commit 36b90ed

Browse files
author
Max Black
committed
docs: simplify type field documentation per feedback
As suggested by @wraithgar, simplified the type field documentation to just point to Node.js documentation rather than trying to maintain the details ourselves, since npm doesn't parse this field.
1 parent f4c95e1 commit 36b90ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/lib/content/configuring-npm/package-json.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ If `main` is not set, it defaults to `index.js` in the package's root folder.
337337

338338
### type
339339

340-
The `type` field is used by Node.js to determine whether `.js` files should be treated as ES modules or CommonJS modules. This field is not used by npm directly.
340+
The `type` field defines how Node.js should interpret `.js` files in your package. This field is not used by npm.
341341

342-
For detailed information about the `type` field, its possible values (`"module"` or `"commonjs"`), and how it affects module resolution, see the [Node.js documentation on the type field](https://nodejs.org/api/packages.html#type).
342+
See the [Node.js documentation on the type field](https://nodejs.org/api/packages.html#type) for more information.
343343

344344
### browser
345345

0 commit comments

Comments
 (0)