Skip to content

package.json should include an explicit "main" entry #1009

Open
@mstange

Description

@mstange

This was previously discussed in #94: It's good practice to include a "main": "main-file.js" entry in package.json, so that the generated npm package is usable without specifying a file name.

The current workaround is to use wasm-pack build --out-name index, or to manually adjust package.json after the build. However, even with the main file being called "index.js", it would be better to have an explicit "main": "index.js" entry, according to this comment by @ljharb, who is on the nodejs Modules team.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions