Skip to content

Import from parent module #36

@robinchew

Description

@robinchew

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions