Skip to content

Commit a423d11

Browse files
committed
fix: Added ESM note in the README.md
1 parent 936ff29 commit a423d11

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ Example of a response validation error:
169169
}
170170
```
171171

172+
## ESM Only
173+
174+
This package only supports to be directly imported in a ESM context.
175+
176+
For informations on how to use it in a CommonJS context, please check [this page](https://gist.github.com/ShogunPanda/fe98fd23d77cdfb918010dbc42f4504d).
177+
172178
## Contributing to fastify-http-errors-enhanced
173179

174180
- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@
2424
"README.md"
2525
],
2626
"type": "module",
27-
"main": "./dist/index.js",
2827
"exports": "./dist/index.js",
29-
"typings": "types/index.d.ts",
30-
"types": "types/index.d.ts",
28+
"typings": "./types/index.d.ts",
29+
"types": "./types/index.d.ts",
3130
"scripts": {
3231
"prebuild": "rm -rf dist types && npm run lint",
3332
"build": "tsc -p . && esm-pkg-add-imports-extensions dist",

0 commit comments

Comments
 (0)