Skip to content

Commit 0ab998c

Browse files
committed
Doc update: include "Usage with esm"
- Closes #99
1 parent 0d946df commit 0ab998c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ You can use `module-alias` within another NPM package, however there are a few t
170170
Here is an [example project](https://github.com/Kehrlann/module-alias-library).
171171

172172

173+
## Usage with esm
174+
175+
[esm](https://www.npmjs.com/package/esm) tries to handle all imports when parsing a file, before actually loading any module. This means module-alias' `register` call will not be processed in time. To make `module-alias` work with `esm`, please consider using:
176+
177+
```
178+
node -r module-alias/register -r esm index.js
179+
```
180+
173181
## Known incompatibilities
174182

175183
This module does not play well with:

0 commit comments

Comments
 (0)