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
Update doc/api/esm.md
Co-authored-by: Guy Bedford <guybedford@gmail.com>
  • Loading branch information
MylesBorins and guybedford authored May 5, 2020
commit 4f97c02205a37b6c2dcd240fb98b810e3fa482b0
9 changes: 5 additions & 4 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,11 @@ Alternatively a project could choose to export entire folders:

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. As the ES Module loader in
Node.js will not resolve file extensions or an `index.js` exporting the root is
less expressive than either of the above examples as individuals will be unable
to `import feature from 'my-mod/feature'`.
the package at the cost of disabling the encapsulation and potential tooling
benefits this provides. As the ES Module loader in Node.js will not resolve file
extensions or an `index.js` exporting the root is less expressive than either of
the above examples as individuals will sill be unable to
`import feature from 'my-mod/feature'`.

#### Main Entry Point Export

Expand Down