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

Add main package.json field #75

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Add main package.json field #75

merged 1 commit into from
Jan 16, 2023

Conversation

remziatay
Copy link
Contributor

@remziatay remziatay commented Jan 16, 2023

Default value of main field is index.js, but no such file is exported. This confuses some resolvers, causing them to throw errors on imports directly from wc-context. Adding correct main file to package fixes this issue

Note: This was not a problem on v0.10

@blikblum
Copy link
Owner

I migrated the package to use exports: https://nodejs.org/api/packages.html#exports

It should be supported by major bundlers by now.

What build tool are you using?

@remziatay
Copy link
Contributor Author

It's an eslint plugin eslint-plugin-import. Maybe I should report it there then?

@blikblum
Copy link
Owner

Maybe I should report it there then?

Probably

Anyway, i will add this field that should be ignored by modern tools anyway

@blikblum blikblum merged commit 1b1c1d1 into blikblum:master Jan 16, 2023
@blikblum
Copy link
Owner

There's already an issue: import-js/eslint-plugin-import#1810

@blikblum
Copy link
Owner

The core issue is in: browserify/resolve#222

@remziatay
Copy link
Contributor Author

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants