jimhigson / oboe.js

A streaming approach to JSON. Oboe.js speeds up web applications by providing parsed objects before the response completes.
http://jimhigson.github.io/oboe.js-website/index.html
Other
4.79k stars 208 forks source link

Bugfix/window is undefined for webworker #208

Open Aigeec opened 4 years ago

Aigeec commented 4 years ago

Fixes #201

There were two issues with the 2.1.5 code.

The first as noted in the issue itself was that there were some references to window in Oboe itself. These have been removed.

The second was that with the package now bundled by webpack it also introduced a reference to window. This is a know webpack issue (https://github.com/webpack/webpack/issues/6642) (https://github.com/webpack/webpack/issues/6525). I've updated the webpack config to use an expanded definition of the globalObject as per (https://github.com/webpack/webpack/issues/6525#issuecomment-552140798)

JuanCaicedo commented 4 years ago

@Aigeec seems like a great thing to fix!

Unfortunately I'm not planning on working on Oboe moving forward. If you're confident with this PR, feel free to merge 👍

I've added you to the npm package as a maintainer so you can publish new versions in the future 😀