Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upBreaks in workers #2
Comments
ahutchings
referenced this issue
Nov 5, 2014
Closed
Use 'global' instead of 'window' for web worker compatibility #3
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
latentflip
Nov 5, 2014
Contributor
Ooft, good spot, my bad. I think I'll change this to only export version info if window exists, as that probably makes more sense.
|
Ooft, good spot, my bad. I think I'll change this to only export version info if window exists, as that probably makes more sense. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
latentflip
Nov 5, 2014
Contributor
Okay, published as 1.0.2
You'll need to either reinstall your node modules to pick it up in all the sub dependencies, or install "ampersand-version": "^1.0.2" at the top level of your app.
|
Okay, published as 1.0.2 You'll need to either reinstall your node modules to pick it up in all the sub dependencies, or install |
latentflip
closed this
Nov 5, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ahutchings
commented
Nov 5, 2014
|
Great, thanks! |
ahutchings commentedNov 5, 2014
ampersand-version has a hard dependency on
window, which doesn't exist in web workers and throwsUncaught ReferenceError: window is not defined.I confirmed that ampersand-state functions in a worker if
windowis changed toglobalin ampersand-version. Browserify will resolveglobalto the appropriate context in both browser windows and workers.