Skip to content

Commit a22c5c1

Browse files
authored
add tldr section
1 parent 26176b0 commit a22c5c1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@
3535
<small><i><a href='#'>This is a work in progress</a></i></small>
3636

3737

38+
## `package.json` TLDR
39+
40+
```jsonc
41+
//...
42+
"type": "module",
43+
"main": "dist/index.cjs", // or .js if "type" is unspecified
44+
"exports": {
45+
"import": "./dist/index.js", // no need for .mjs if "type" is "module" (recommended)
46+
"require": "./dist/index.cjs" // or .js if "type" is unspecified
47+
//...
48+
```
49+
3850
## Motivation
3951
4052
Establishing the best way to support cjs and esm and how to structure project to enable that (see results.txt for more info)

0 commit comments

Comments
 (0)