module-deps icon indicating copy to clipboard operation
module-deps copied to clipboard

options.paths not used for transforms

Open fk-hb opened this issue 7 years ago • 4 comments

Hi, Is there any reason why you dont pass paths in loadTransforms? I had some transforms installed in a separate directory referenced by NODE_PATH. node find them correctly but browserify not even if I pass that directory to the paths option of browserify. I went down the calls until I found that the missing piece is to add paths: self.paths to the params variable in loadTransform. By doing that, it now works but I don't know if this is the right solution.

fk-hb avatar Jul 29 '18 00:07 fk-hb

Any reaction?

fk-hb avatar Aug 14 '18 20:08 fk-hb

I've never used NODE_PATH and haven't got a clue, but it sounds like people who do use it generally expect it to apply to transforms too, so we should probably land one of the existing PRs that implements this.

https://github.com/browserify/module-deps/pull/120 https://github.com/browserify/module-deps/pull/92

goto-bus-stop avatar Aug 15 '18 12:08 goto-bus-stop

I've seen there is already PRs for exactly this subject. Both PRs have made the exact same modification as the one I made. #120 contains test code. #92 solves an another error: Error message will always contain undefined since it references the wrong variable. If you should only accept one, then #120...

fk-hb avatar Aug 15 '18 13:08 fk-hb

Hi @goto-bus-stop, Do you know when you can accept of the PRs that solve this issue?

fk-hb avatar Sep 17 '18 13:09 fk-hb