Skip to content

Added browser shim for process #808

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

Closed
wants to merge 1 commit into from
Closed

Conversation

sclausen
Copy link

As requested in #804, here is a browser shim for process, which is needed to use mqtt.js with angular-cli >= 6.0.0, since they removed the node-shims.

@codecov
Copy link

codecov bot commented Apr 16, 2018

Codecov Report

Merging #808 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #808   +/-   ##
=======================================
  Coverage   93.75%   93.75%           
=======================================
  Files           8        8           
  Lines         737      737           
  Branches      183      183           
=======================================
  Hits          691      691           
  Misses         46       46

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e797698...f8215b4. Read the comment docs.

@RangerMauve
Copy link
Contributor

Wouldn't it be better to have node-shims included in the build? Would this be defining the process global that's needed by the code?

@sclausen sclausen closed this Apr 16, 2018
@sclausen
Copy link
Author

No, this crap doesn't work at all. It seems I have to learn more about to shim things ;)

@RangerMauve
Copy link
Contributor

Yeah, it's pretty finicky stuff. That's why I stick to browserify a lot these days.

@RangerMauve
Copy link
Contributor

Speaking of which, if you're in a rush and having trouble, you could turn mqtt.js into a browserified bundle and import that in your angular app.

@sclausen
Copy link
Author

Unfortunately, it's a library and I have no clue, how to embed a js-file in this bleeding edge angular-cli lib project.

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 this pull request may close these issues.

2 participants