{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/1437","labels_url":"https://api.github.com/repos/webpack/webpack/issues/1437/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/1437/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/1437/events","html_url":"https://github.com/webpack/webpack/issues/1437","id":105838971,"number":1437,"title":"Require using ~/foo","user":{"login":"kolodny","id":1187604,"avatar_url":"https://avatars.githubusercontent.com/u/1187604?v=3","gravatar_id":"","url":"https://api.github.com/users/kolodny","html_url":"https://github.com/kolodny","followers_url":"https://api.github.com/users/kolodny/followers","following_url":"https://api.github.com/users/kolodny/following{/other_user}","gists_url":"https://api.github.com/users/kolodny/gists{/gist_id}","starred_url":"https://api.github.com/users/kolodny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kolodny/subscriptions","organizations_url":"https://api.github.com/users/kolodny/orgs","repos_url":"https://api.github.com/users/kolodny/repos","events_url":"https://api.github.com/users/kolodny/events{/privacy}","received_events_url":"https://api.github.com/users/kolodny/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-10T15:53:20Z","updated_at":"2015-09-11T11:21:08Z","closed_at":null,"body":"When I need to require something which I know is in the root of my project or one folder in, I would like to be able to do something like `require('~/foo')` and not have to figure out where it is relative to me like `require('../../../foo')`, is there any way to do that?\r\n\r\nI already know about using something like `modulesDirectories: ['.', 'node_modules']` but I want to be able to differntiate between downloaded modules and internal modules, so I know the difference between `require('utils')` and `require('~/utils')`, meaning I want the `~` char there or something similar"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/139518995","html_url":"https://github.com/webpack/webpack/issues/1437#issuecomment-139518995","issue_url":"https://api.github.com/repos/webpack/webpack/issues/1437","id":139518995,"user":{"login":"jhnns","id":781746,"avatar_url":"https://avatars.githubusercontent.com/u/781746?v=3","gravatar_id":"","url":"https://api.github.com/users/jhnns","html_url":"https://github.com/jhnns","followers_url":"https://api.github.com/users/jhnns/followers","following_url":"https://api.github.com/users/jhnns/following{/other_user}","gists_url":"https://api.github.com/users/jhnns/gists{/gist_id}","starred_url":"https://api.github.com/users/jhnns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhnns/subscriptions","organizations_url":"https://api.github.com/users/jhnns/orgs","repos_url":"https://api.github.com/users/jhnns/repos","events_url":"https://api.github.com/users/jhnns/events{/privacy}","received_events_url":"https://api.github.com/users/jhnns/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T11:21:08Z","updated_at":"2015-09-11T11:21:08Z","body":"Aliasing shoot work, but I'd recommend not to use `~` because its too ambiguous. You could call it `root` or `app`. "}}