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

Reference to window causing fail package load for server side rendering projects #1909

Closed
vsumitra opened this issue Jun 27, 2019 · 1 comment

Comments

@vsumitra
Copy link

CacheStorage.setContext(window);
\node_modules\html2canvas\dist\html2canvas.js:6856:29

Reference to window cause project that implement server side rendering to fail to load dependency modules, even thought we attempt to split the package for lazy load using:
import(/* webpackChunkName: "html2canvas" */ "html2canvas").then(module => {
...})

@vsumitra
Copy link
Author

If I wrap my module resolve in an if block is seem to work:
if (isBrowser()) {
import(/* webpackChunkName: "html2canvas" */ "html2canvas").then(module => {
...})
}

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

1 participant