Skip to content

docs: the "publishing packages" page has no example 'exports' field with object syntax #767

Open
@bjesuiter

Description

@bjesuiter

What I see

Every Example on the page https://jsr.io/docs/publishing-packages,
and especially in the section package-config-file
only has examples like

  "exports": "./mod.ts"

What I want

An example, which shows how to use "exports" with object syntax.
Especially I want to know:
How to write the main import in object syntax?
Do I write it like this?

"exports": {
  "/": "./mod.ts"
  "/extra": "./extra/mod.ts"
}

Or like this?

"exports": {
  ".": "./mod.ts"
  "extra": "./extra/mod.ts"
}

Or something completely different?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions