Hacker News new | past | comments | ask | show | jobs | submit login

Don't go overloading `require()` just because you can - the modules API has been locked down for a couple of years now, messing with the semantics causes all sort of fallout. - https://nodejs.org/api/modules.html (I'm looking at you webpack, babel)

Instead better would've been to use a custom method; internally the `require.resolve()` API can still be used to get the same semantics as `require()`




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: