Fix incorrect main field in npm package
#105
Reference in New Issue
Block a user
Delete Branch "robinnorth-patch-2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This was actually on my to do list.
However, I think the
mainfield should point toindex.js. If I'm not mistaken, only Node uses themainfield, to determine the entry point of the module. Anyonerequireing this package in Node is doing the bundling themselves, so we might as well serve the source itself without the Browserify wrapper code. Someone who is using the library in a broswer in ascripttag (using unpkg.com) will link topjax.jsdirectly.You are indeed right, it really should be the other way around. Clearly it used to point to the built library file, but it does make more sense to point at the source. I'll amend my PR for you.