Skip to content
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

process should resolve to browser.js instead of index.js #50

Closed
andersekdahl opened this issue Mar 7, 2015 · 2 comments · Fixed by #51
Closed

process should resolve to browser.js instead of index.js #50

andersekdahl opened this issue Mar 7, 2015 · 2 comments · Fixed by #51

Comments

@andersekdahl
Copy link
Contributor

Currently process is resolved with "process": require.resolve('process/') but the process package has one entry point for Node and one for browser. By using require.resolve('process/') you get the Node entry point, which doesn't work for the browser. The same fix should be applied to process that is applied to os-browserify.

That is, this line:

"process": require.resolve('process/'),

Should be:

"process": path.resolve(require.resolve('process/'), '..', 'browser.js'),
andersekdahl added a commit to andersekdahl/karma-common-js that referenced this issue Mar 7, 2015
Don't expose Buffer by replacing use with a require call, but
expose Buffer and process as real globals instead, since they are
globals in Node.js.

Note that this depends on these issues to be fixed:
karma-runner/karma#1340
alexgorbatchev/node-browser-builtins#50
@AndreasMadsen
Copy link
Collaborator

Good catch. Mind doing a PR?

@andersekdahl
Copy link
Contributor Author

I'm on it!

andersekdahl added a commit to andersekdahl/node-browser-builtins that referenced this issue Mar 7, 2015
Use the browser entry point instead of the entry point for Node.js

Closes alexgorbatchev#50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants