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

v^1.xx.xx doesn't support ssr in react by referencing window #104

Closed
victorthevong opened this issue Sep 4, 2019 · 3 comments · Fixed by #106
Closed

v^1.xx.xx doesn't support ssr in react by referencing window #104

victorthevong opened this issue Sep 4, 2019 · 3 comments · Fixed by #106
Assignees

Comments

@victorthevong
Copy link

v0.5.1 does call window reference and handles it if it doesn't exist.

in v^1.xx.xx it calls window which doesn't allow ssr.

For those wondering any ANT DESIGN users who use the latest version (^3.23.1) ismobilejs is used by some packages and has updated to ismobilejs v1.xx.xx.

In your package.json in resolutions place ismobilejs as 0.5.1 for ssr

@victorthevong victorthevong changed the title v^1.xx.xx dosnt support ssr in react v^1.xx.xx doesn't support ssr in react by referencing window Sep 4, 2019
@nevestuan
Copy link

We use Next.js framework with Ant Design and had the same problem with this due to natively SSR feature of the Next.js. The workaround is to use Dependency Resolutions to fix the version back to 0.5.1. https://www.npmjs.com/package/npm-force-resolutions

@kaimallea
Copy link
Owner

I'm sorry about this; fix for the dist version incoming that stops referencing window explicitly and instead references global this

@kaimallea kaimallea self-assigned this Sep 10, 2019
@kaimallea kaimallea added the bug label Sep 10, 2019
kaimallea pushed a commit that referenced this issue Sep 10, 2019
kaimallea pushed a commit that referenced this issue Sep 11, 2019
@kaimallea
Copy link
Owner

🎉 This issue has been resolved in version 1.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants