Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define main in package.json #72

Open
rafipiccolo opened this issue Dec 14, 2024 · 2 comments
Open

define main in package.json #72

rafipiccolo opened this issue Dec 14, 2024 · 2 comments

Comments

@rafipiccolo
Copy link
Contributor

import-js/eslint-plugin-import#3114

Hi,

i dont understand it fully, but it looks like the linky package currently uses the exports field in its package.json to define its entry points. However, some tools, such as eslint-plugin-import, do not yet support the exports field. This causes resolution errors when importing this package.

For compatibility with such tools, could you add a main field to the package.json? For example:

"main": "./dist/lib/index.js"

This would make the package easier to use in a wider variety of environments.

Thank you!

@bokub
Copy link
Owner

bokub commented Dec 16, 2024

Hi @rafipiccolo

I'm quite surprised, "exports" is pretty standard, and it what the Node.js documentation recommends.

However, I don't mind adding a "main" field if it can help your

If both "exports" and "main" are defined, the "exports" field takes precedence over "main" in supported versions of Node.js.

Do you want to open a pull request ? You can add the "main" field and bump the patch version

@rafipiccolo
Copy link
Contributor Author

thx, here is the PR: #74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants