Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 21b0132

Browse filesBrowse files
Trottaddaleax
authored andcommitted
doc: improve paragraph in esm.md
Edit for clarity, correct tense, and brevity. PR-URL: #34064 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 66cd7bf commit 21b0132
Copy full SHA for 21b0132

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Open diff view settings
Collapse file

‎doc/api/esm.md‎

Copy file name to clipboardExpand all lines: doc/api/esm.md
+5-5Lines changed: 5 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ as ES modules and `.cjs` files are always treated as CommonJS.
124124
### Package scope and file extensions
125125

126126
A folder containing a `package.json` file, and all subfolders below that folder
127-
down until the next folder containing another `package.json`, is considered a
128-
_package scope_. The `"type"` field defines how `.js` files should be treated
129-
within a particular `package.json` file’s package scope. Every package in a
127+
until the next folder containing another `package.json`, are a
128+
_package scope_. The `"type"` field defines how to treat `.js` files
129+
within the package scope. Every package in a
130130
project’s `node_modules` folder contains its own `package.json` file, so each
131-
project’s dependencies have their own package scopes. A `package.json` lacking a
132-
`"type"` field is treated as if it contained `"type": "commonjs"`.
131+
project’s dependencies have their own package scopes. If a `package.json` file
132+
does not have a `"type"` field, the default `"type"` is `"commonjs"`.
133133

134134
The package scope applies not only to initial entry points (`node my-app.js`)
135135
but also to files referenced by `import` statements and `import()` expressions.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.