benbria / aliasify

Rewrite require calls in browserify modules.
MIT License
204 stars 26 forks source link

Update aliasify.js #5

Closed amelon closed 10 years ago

amelon commented 10 years ago

could you fix path join using path.join instead of string concatenation.

Also, some issue with windows path :( fixed replacing \ string.

(sorry I don't know how to write coffee)

jwalton commented 10 years ago

Unfortunately, this doesn't work. On OS X, if you call path.join('.', 'foo'), it returns "foo" instead of "./foo", and of course there's a world of difference between "./foo" and "foo".

But... surely you don't need to write require('.\foo') on windows? "." is certainly valid on Windows, and "/" must work, otherwise all libraries would need windows and POSIX versions.

What problem are you seeing exactly?

jwalton commented 10 years ago

Try v1.2.3 and see if this fixes the problems you're having. Feel free to re-open this if you're still running into problems. Thanks!