Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import from parent module #36

Open
robinchew opened this issue Feb 21, 2019 · 1 comment
Open

Import from parent module #36

robinchew opened this issue Feb 21, 2019 · 1 comment

Comments

@robinchew
Copy link

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
Copy link
Owner

Sorry for the missing reply @robinchew .

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants