Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: include folder example
  • Loading branch information
MylesBorins committed May 4, 2020
commit 65cdd69eef3332a3a3db52526e4065a9f75c7d0f
15 changes: 15 additions & 0 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,21 @@ a project that previous exported `main`, `lib`,
}
```

Alternatively a project could choose to export entire folders:

```json
{
"exports": {
".": "./lib/index.js",
"./lib": "./lib/index.js",
"./lib/": "./lib/",
"./feature": "./feature/index.js",
"./feature/": "./feature/",
"./package.json": "./package.json"
}
}
```

As a last resort, package encapsulation can be disabled entirely by creating an
export for the root of the package `"./": "./"`. This will expose every file in
Comment thread
hybrist marked this conversation as resolved.
the package at the cost of disabling encapsulation.
Expand Down