Skip to content
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions doc/api/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,17 +612,23 @@ The following condition definitions are currently endorsed by Node.js:
* `"browser"` - any environment which implements a standard subset of global
browser APIs available from JavaScript in web browsers, including the DOM
APIs.
* `"deno"` - indicates a variation for the Deno platform.
* `"development"` - can be used to define a development-only environment
entry point. _Must always be mutually exclusive with `"production"`._
* `"production"` - can be used to define a production environment entry
point. _Must always be mutually exclusive with `"development"`._
* `"source"` - indicates the original .js source file without minification
or bundling optimizations, useful for development and debugging workflows.
* `"types"` - can be used by typing systems to resolve the typing file for
the given export, possible since the interface should be the same for all
variations.

The above user conditions can be enabled in Node.js via the
[`--conditions` flag][].

Platform specific conditions such as `"deno"`, `"electron"`, or `"react-native"`
may be used, but while there remain no implementation or integration intent
from these platforms, the above are not explicitly endorsed by Node.js.
Platform specific conditions such as `"electron"`, or `"react-native"` may
be used, but while there remain no implementation or integration intent
from these platforms, we do not yet explicitly recommend them.

New conditions definitions may be added to this list by creating a pull request
to the [Node.js documentation for this section][]. The requirements for listing
Expand Down