When using Brunch to concatenate files (while also using my patch from https://github.com/brunch/commonjs-require-definition/pull/22), and then after loading a concatenated file as a web worker, I get the following error: Uncaught ReferenceError: window is not defined. The offending statement is this one: var global = window;. This patch allows us to obtain the global object in web workers and other environments.
When using Brunch to concatenate files (while also using my patch from https://github.com/brunch/commonjs-require-definition/pull/22), and then after loading a concatenated file as a web worker, I get the following error:
Uncaught ReferenceError: window is not defined
. The offending statement is this one:var global = window;
. This patch allows us to obtain the global object in web workers and other environments.