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

window.Immutable #34

Closed
dantman opened this issue Aug 3, 2015 · 1 comment
Closed

window.Immutable #34

dantman opened this issue Aug 3, 2015 · 1 comment

Comments

@dantman
Copy link

dantman commented Aug 3, 2015

GeneralStore uses window.Immutable in the code.

var compare = window.Immutable && typeof window.Immutable.is === 'function' ? window.Immutable.is : function (a, b) {
  return a === b;
};

This use of window means that general-store cannot be required at all on the server because a ReferenceError is thrown when window is accessed.

Also, when Immutable is loaded as a module it does not define Immutable on window. This means that if general-store and immutable are required by browserified code GeneralStore will not use Immutable.is.

dantman added a commit to dantman/general-store that referenced this issue Aug 3, 2015
- Checks that `window` exists, before trying to use it.
- Before using `window.Immutable` try `require("immutable")`.
- Declare 'immutable' as an external so Immutable will not be bundled into dist/ and browserify will check to see if Immutable is defined outside the static bundle.
dantman added a commit to dantman/general-store that referenced this issue Aug 11, 2015
- Checks that `window` exists, before trying to use it.
- Before using `window.Immutable` try `require("immutable")`.
- Declare 'immutable' as an external so Immutable will not be bundled into dist/ and browserify will check to see if Immutable is defined outside the static bundle.
@colbyr
Copy link
Contributor

colbyr commented Aug 21, 2015

should be resolved as of #36

@colbyr colbyr closed this as completed Aug 21, 2015
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

No branches or pull requests

2 participants