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

support import from node versions < 12.7 #12

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

reaganr
Copy link

@reaganr reaganr commented Sep 5, 2023

Node versions < 12.7 can't import non-.js files (such as .json) that aren't explicitly exposed from the package.json using "main" or similar explicit export properties.

explicitly export `"main" : "index.json"` to support importing from node versions <= 12.7
@kemitchell
Copy link
Member

I'm pretty sure Node.js versions from well before the io.js split supported index.json requires without package.json meta. If this changed---or changed and changed back---more recently, do you happen to know in which versions?

I'm not against spec'ing main in package.json.

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.

None yet

2 participants