Skip to content

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.

2 participants