Skip to content

Commit

Permalink
Add docs for the "module" package.json field
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Scott committed Feb 25, 2017
1 parent 179855b commit b3fb67a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ For example, the following would create a global `__DEV__` variable set to `true

Note that, if you specify a global reference value (like an object or array) here, and some code mutates that value in the midst of running a test, that mutation will *not* be persisted across test runs for other test files.

### `module` [boolean]
Default: `false`

Respect the [`"module"` field](https://github.com/nodejs/node-eps/blob/master/002-es6-modules.md) in `package.json`. Many libraries that contain ES modules ([import/export syntax](http://www.2ality.com/2014/09/es6-modules-final.html)) use this field as a pointer to their untranspiled (ES6+) source, in addition to the ubiquitous `"main"` field that points to precompiled ES5 javascript.

_TL;DR: enable this if your project uses import/export syntax._

### `moduleFileExtensions` [array<string>]
Default: `["js", "json", "jsx", "node"]`

Expand Down

0 comments on commit b3fb67a

Please sign in to comment.