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

Does a simple `require('package')` without the slashes fetch the thing from NPM?

Maybe it could. Maybe it could also work with `require('[email protected]')` and other sugars like this.



require('package') will look into the manifest to see if there's a remote path and version to use, otherwise it will be set as unresolved and ignored in the build.




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

Search: