Note this is a Babel 5 plugin.
I'm now personally use - https://github.com/jshanson7/babel-plugin-resolver plugin that supports babel 6
A Bable plugin for importing modules relative to the current working directory (cwd). Idea taken from FakeRainBrigand answer http://stackoverflow.com/a/31069137/1329668
In
import myModule from 'cwd://mymyModule';Out
import myModule from '<relative_path_from_your_current_place>mymyModule';$ npm install babel-plugin-project-relative-require.babelrc
{
"plugins": ["babel-plugin-project-relative-require"]
}$ babel --plugins babel-plugin-project-relative-require script.jsrequire("babel-core").transform("code", {
plugins: ["babel-plugin-project-relative-require"]
});