Skip to content

Conversation

@peutetre
Copy link

re allow browserify to accept win32 file path in require(file, opts) when working with multiple drives.
For more detail: https://gist.github.com/peutetre/ab74062c2bb14f49889f

@smrq
Copy link
Contributor

smrq commented Oct 15, 2014

👍 I just independently made this change myself before I realized there might be a PR for it already :)

@smrq
Copy link
Contributor

smrq commented Oct 15, 2014

You have an error in your regexp, though. It should be: /^[\/.]|^[a-zA-Z]:/ (yours matches ,: in addition to c:, etc.)

Even more strict would be: (process.platform === 'win32' ? /^(\.|[a-zA-Z]:)/ : /^[\/.]/)

@peutetre
Copy link
Author

👍 @smrq closing this one for #948

@peutetre peutetre closed this Oct 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants