Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use the `import-local` module #1376
I've used this method in a few other projects, so I thought I might as well make a module out of it.
I could use some feedback on the approach too: https://github.com/sindresorhus/import-local/blob/87a0c91a9a0ecea64471a95479b0366af296b989/index.js#L7-L10
I'm aware the existing test for this is failing. I was not sure how to properly mock this as I don't think you can use
Approach seems good. I like how you take the relative path from the potential global directory, and then map it to a local import.
We could stub
I think if you create a fixture directory that contains a
At this point running the normal
This should replace