Skip to content

Instantly share code, notes, and snippets.

@dandean
Last active August 29, 2015 14:04
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dandean/6e444c586dbae2a89c9e to your computer and use it in GitHub Desktop.
Save dandean/6e444c586dbae2a89c9e to your computer and use it in GitHub Desktop.
Link a module to itself to get around relative require hell.
{
"private": "true",
"name": "app-name",
"version": "1.0.0"
}
// So something like this:
require('../../../lib/foo.js');
// Is now:
require('app-name/lib/foo.js');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment