Skip to content

doc: define "browser", "production", "development" conditions

Rodrigo Muino Tomonari requested to merge conditions into master

As per recent conversations, this updates the conditions documentation to include a new Conditions Definitions section that defines the "browser", "production" and "development" conditions.

In terms of implemenation, we could possible add a simple validation that "production" and "development" are mutually exclusive when used in Node.js, but that could be a separate PR.

An alternative to the above would be to move these definitions to another home or location, which I'm completely open to as well.

In addition I've added some guidance on conditions defintions process, whether or not Node.js should be the primary home for this but as the original definition source of the "exports" field we can at least start the conversation here on this.

//cc @nodejs/modules @devongovett @sokra @developit

Merge request reports

Loading