Skip to content

Commit

Permalink
Updated packages.md fixed a paragraph
Browse files Browse the repository at this point in the history
Simplified the paragraph under the heading ###Determining module system, mentioning --experimental-detect-module flag and reference to cli.md
  • Loading branch information
shubherthi-mitra authored Dec 9, 2023
1 parent e2e556a commit b19e147
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions doc/api/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ expressions:
* Strings passed in as an argument to `--eval`, or piped to `node` via `STDIN`,
with the flag `--input-type=module`.

* When using [`--experimental-detect-module`][], code that contains syntax that
only parses successfully as [ES modules][], such as `import` or `export`
statements or `import.meta`, when the code has no explicit marker of how it
should be interpreted. Explicit markers are `.mjs` or `.cjs` extensions,
`package.json` `"type"` fields with either `"module"` or `"commonjs"` values,
or `--input-type` or `--experimental-default-type` flags. Dynamic `import()`
* When using [`--experimental-detect-module`][], code containing syntax only
successfully parsed as [ES modules][], such as `import` or `export`
statements or `import.meta`, having no explicit marker of how it should be
interpreted. Explicit markers are `.mjs` or `.cjs` extensions, `package.json`
`"type"` fields with either `"module"` or `"commonjs"` values, or
`--input-type` or `--experimental-default-type` flags. Dynamic `import()`
expressions are supported in either CommonJS or ES modules and would not
cause a file to be treated as an ES module.

Expand Down

0 comments on commit b19e147

Please sign in to comment.