mtth / avsc

Avro for JavaScript :zap:
MIT License
1.27k stars 147 forks source link

Make the "main" property point to the "index.js" file #404

Closed FredericEspiau closed 1 year ago

FredericEspiau commented 1 year ago

The "main" property of the "package.json" file should point to a "js" file, not to a folder, you can see some examples here: https://github.com/npm/cli/blob/latest/workspaces/arborist/test/arborist/reify.js

I'm surprised nobody complained before, it causes some issues in my projects

mtth commented 1 year ago

Hi @FredericEspiau. Thanks for the PR. Before proceeding, I'd like to understand what is special about your setup. Can you share a way to reproduce the issue? As you point out, avsc seems to be importing fine for everyone else. AFAIK it suffices for main to point to something that can be used with require or import (both of which work with folders).