I\'m writing a node app with es6 using babel transpiler.
I have 2 files index.js & my-module.js on my root directory
index.js
my-module.js
-
The solution from FakeRainBrigand/Gavriguy is good and works well. So i decided to develop a plugin which you can easily install with npm in and use a simple Babel-Plugin.
https://github.com/michaelzoidl/babel-root-import
Hope this helps...