Closed matthewmueller closed 9 years ago
That's strange, what doesn't work exactly? I just tried it and I didn't have any issues
oops, didn't leave enough info. in test/index.js
there was a require('../')
. So I don't think the root path is properly working with stdin.
Ooooooh, you mean the root
parameter is being ignored. I thought you meant that stdin
itself was being ignored.
haha yah, my bad, wrote this in a hurry
After digging around at this, turns out it's not a bug per se. Since you're using stdin on test/index.js
, the relative paths cannot be resolved as you would expect, since the root is a directory higher.
If you use require('.');
from within test/index.js
, it will include the root module. But of course that doesn't make sense, since that relative path is no longer relative to your source file. Your only other option is to use require('/');
(which works in both stdin mode and entry mode)
It's worth pointing out, this is just a trickiness that comes up while dealing with entries coming from stdin, so I think I will close this issue. (feel free to re-open if I am in error)
example:
this does work though: