esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

Support main.js as entrypoint like index.js

Open tjconcept opened this issue 1 year ago • 2 comments

I'm wondering if it would make sense to support main.js as an entrypoint like index.js is.

However, I'm actually more curious what the current logic is. Why is index.js supported?

tjconcept avatar Oct 22 '24 15:10 tjconcept

you can point the entry with main.js in the package.json

{
  "main": "main.js",
   // or
  "module": "main.mjs"
}

ije avatar Oct 23 '24 06:10 ije

Sure, but.. what if I don't have a package.json (or similar) file? 😅

tjconcept avatar Oct 23 '24 11:10 tjconcept