yortus / require-self

Lets you require('foobar') from within foobar itself
MIT License
19 stars 5 forks source link

doesn't work w/ scoped references #2

Closed benmonro closed 7 years ago

benmonro commented 8 years ago

My module has a name like this: "name":"@myCompany/my-module"

in this case require-self should be exporting ../../ instead of just ..

benmonro commented 8 years ago

added PR: https://github.com/yortus/require-self/pull/3

yortus commented 8 years ago

Thanks @benmonro for raising this, happy to support scoped packages (I haven't used them myself so far).

I think the PR needs a little extra logic (see my comment there) but then I'll be happy to merge it.

yortus commented 7 years ago

7 fixes this.

LeMisterV commented 7 years ago

Hi @yortus ,

7 added a useful support for scoped modules. Would it be possible you publish a new version with this improvement ?

Thx a lot