esm-dev / esm.sh

The no-build CDN for modern web development.
https://esm.sh
MIT License
3.18k stars 150 forks source link

Support main.js as entrypoint like index.js #897

Open tjconcept opened 1 month ago

tjconcept commented 1 month ago

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?

ije commented 1 month ago

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

{
  "main": "main.js",
   // or
  "module": "main.mjs"
}
tjconcept commented 1 month ago

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