Skip to content

Use exports in package.json #1103

@threeal

Description

@threeal

This issue proposes replacing the current main and types fields in package.json with the exports field.

Using exports provides a clearer and more controlled way to define which modules can be imported by users. This helps prevent access to internal files or unsupported import paths.

It would also allow users to import submodules in a standardized way, such as:

import "foo/bar";

instead of:

import "foo/src/bar.ts";

In addition, this may remove the need for index.js files that exist only for barrel exports.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions