porsager / wright

🚀 Work Fast Work Wright
Do What The F*ck You Want To Public License
178 stars 15 forks source link

Import from parent module #36

Open robinchew opened 5 years ago

robinchew commented 5 years ago

I can't import modules that are parent to the main index.js, so the following don't work:

import other from './other.js';
import parnt from  '../parent.js'; // <-- can't do this

console.log('indexjs' + other() + parnt());

I have JS code that's shared amongst 2 projects so I put the code in the parent folder. My workaround now is to symbolic link the parent folder with all the shared code to each of the project folder.

porsager commented 5 years ago

Sorry for the missing reply @robinchew .

This might become relevant for me real soon too, so I'll put some thought into it ;)