-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: document validation for SSR #3096
Conversation
Hello @bodymovin. Could you please review this PR? Thanks. |
please review and merge this @bodymovin |
Hey @bodymovin, would it be possible to merge this PR? |
@mbasaglia Sorry for tagging you, just maybe you can help to merge this PR. People are really suffering from this problem. (I can provide a fix for the comment above). |
I'm not familiar with rollup so I don't know what the fix does |
In case it helps: (typeof document !== 'undefined') && /* some IIFE here, according to the build */ This line is modelled after the existing setup ( Essentially, the change in this PR injects an extra check as part of the build process, to avoid things erroring out in node versions that expose a global The committer of this PR could have opted to change the navigator check plugin to a document check plugin, but the additional plugin ensures that the navigator check still gets made. For example, there might be code inside the block that assumes that I would be happy to follow-up in this or another PR if you want. At work, we are currently maintaining a patch to make lottie-web compatible with recent Node versions, and we would very much like to see something like this upstreamed 😌 Apologies for the drive-by comment, you might know some of these already and I thought I might be of some help. Please let me know if there is any information that I can provide, and I will get back to you promptly! |
I've changed the PR to fix the plugin names, but kept both the validations for now. |
@AliT3 @geomaster sorry to tag you on this PR but you seem to be active in this repo, so was wondering if you'd be able to take a look at this and hopefully get it merged and released? Would make a bunch of people trying to upgrade to the latest Node very happy 😄 |
Or #3129 |
Looks good to me! Thanks for this fix @IcaroG I'll merge now. |
Fixes #2739 #3047 #3077