Skip to content

Commit 1f627df

Browse files
authored
docs: clarifying that ESM support is experimental (#2954)
1 parent 148a8c7 commit 1f627df

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,19 @@ $ yarn lint
151151
```
152152

153153

154+
### Experimental ESM Support
155+
156+
ESM support is currently in the experimental stages, while CJS has been supported
157+
since inception. This means that code loaded using `require()` should work fine
158+
but code loaded using `import` might not always work.
159+
160+
Use the following command to enable experimental ESM support with your application:
161+
162+
```sh
163+
node --loader dd-trace/loader-hook.mjs entrypoint.js
164+
```
165+
166+
154167
### Benchmarks
155168

156169
Our microbenchmarks live in `benchmark/sirun`. Each directory in there

0 commit comments

Comments
 (0)