Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because `require` and `import` look at your package's `main`, which (if it's a directory) implies `dirname/index.js`. Building to an `index.js` entry file is, then, the most standard name that allows `require 'modulename'` to work.

The capitalized rending-of-garments is silly. This is transpiling; file names should remain the same from input to output.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: