nathancahill / split

Unopinionated utilities for resizeable split views
https://split.js.org/
MIT License
6.14k stars 450 forks source link

[q] getting an error with Server-side-rendering setup #137

Open vladp opened 6 years ago

vladp commented 6 years ago

hello, getting error

\ssr-aft\node_modules\split.js\split.js:13
var global = window;
             ^

this is because the import statements 'aggressively' evaluate globals.

I plan to use the library within React didMount (meaning that by the time the library is needed, I will be in the browser). Because selective/dynamic imports are not yet an available feature of javascript -- these kinds of things create problems.

So wanted to check with user community of the Split.js on what they do to get this working with SSR

thank you

nathancahill commented 6 years ago

What bundler are you using to include Split.js?

SomethingSexy commented 5 years ago

I am having this issue with Webpack and TypeScript but I haven't looked into it in much detail yet.