Keen-UI icon indicating copy to clipboard operation
Keen-UI copied to clipboard

Add typeof window checks for SSR

Open MarcPorciuncula opened this issue 7 years ago • 3 comments

Hi,

I've added checks for the window global before any accesses to window or document so that Keen-UI can be used for SSR (and nuxt.js).

UiTooltip.vue and UiPopover.vue have a conditional require because tether-drop has a side effect which accesses document on require, and tether-tooltip also depends on tether-drop.

I used requires instead of import()s to avoid having to deal with async.

Would close https://github.com/JosephusPaye/Keen-UI/issues/261

MarcPorciuncula avatar Mar 10 '17 22:03 MarcPorciuncula

Yes I was able to get this branch working with nuxt

On Tue., 25 Apr. 2017, 12:15 pm kodekrendel, [email protected] wrote:

@MarcoThePoro https://github.com/MarcoThePoro hello. Does this mean that Keen now work with Nuxt?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JosephusPaye/Keen-UI/pull/277#issuecomment-296872235, or mute the thread https://github.com/notifications/unsubscribe-auth/AHazr_SOa9Wxzv61OBL9E7slBRajjZGQks5rzVdOgaJpZM4MZ9hr .

MarcPorciuncula avatar Apr 25 '17 06:04 MarcPorciuncula

Does SSR support are present in current release?

hackuun avatar Feb 07 '18 22:02 hackuun

Currently Keen UI has no support for SSR.

Full SSR support will be Keen UI v2.

JosephusPaye avatar Jan 07 '19 11:01 JosephusPaye