Skip to content

Commit

Permalink
docs(readme): Document extensions option
Browse files Browse the repository at this point in the history
  • Loading branch information
Velenir committed Apr 30, 2017
1 parent ae3148e commit 1d39fa8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,16 @@ The transpilation to make it happen will be performed as follows:
"redirect": {
matchPattern: replacement
},
"suppressResolveWarning": Boolean
"extensions": Array<String>,
"suppressResolveWarning": Boolean
}
```

+ `root` : path, relative to which `replacement` paths are resolved. Equals project root folder by default.
+ `extraFunctions` : functions to consider when matching against keys in redirect in addition to **import**, **export from** declarations, **require()** and dynamic **import()**. It can be a simple function name (`"custom_require"`) or an object.property pair (`"SystemJS.import"`).
+ `promisifyReplacementFor` : functions, in addition to `import()`, for which `replacement` Objects should be wrapped in `Promise.resolve()`.
+ `redirect` : Object with `matchPattern` keys and `replacement` values.
+ `extensions`: Array of extensions to use for resolving filenames. Equals `[".js", ".jsx", ".es", "es6"]` by default, providing custom extensions will override the default.
+ `suppressResolveWarning`: Boolean, `false` by default. During path resolution plugin shows a warning when it can't find a module. It will still do its best to resolve to the right path. This option suppresses that warning.

#### matchPattern
Expand Down

0 comments on commit 1d39fa8

Please sign in to comment.