-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add browser compatibility by making "os" dependency optional — fixes #6 #13
Conversation
I’m happy to merge the fix, but I’m not interested in all this boilerplate for browser testing. A better fix would be to use the “browser” field in package to override the “os” dependency with an empty object. |
Oh, sorry! I didn't check it well enough and just saw the issue. It looks like webpack is already shimming os.homedir(), so probably there is no need for this PR at all, and we can close the issue too. I do not use other bundlers so I am not sure how browserify and the others handle it. According to https://github.com/defunctzombie/package-browser-field-spec it would be safer to add PS. I am sorry to mention it here and even more sorry to bother you, but I've just added a PR to the |
I saw it, but I'm on summer vacation now, so my time is limited for the next 3 weeks. I will try to look at it as soon as I can. |
I understand, so don't spend time on it, I'll wait. And have a restful vacation! :) |
This pr simply requires "os" only in node environment. Also I've added a basic headless browser test using testcafe.
Hope you like it!