nk-o / jarallax

Parallax scrolling for modern browsers
https://jarallax.nkdev.info
MIT License
1.38k stars 210 forks source link

500 document is not defined at Object (getWindowSize.js) #223

Open POGREMIX opened 5 months ago

POGREMIX commented 5 months ago

Issue description:

Can't find DOM document on loaded browser page. I've turned off all functions calls except npm import.

500 document is not defined at Object. (C:\...\node_modules\jarallax\src\utils\getWindowSize.js:38:1)

Version used:

I use jarallax package 2.2.0 into project with Nuxt3, Vue3 and TypeScript.

Code to reproduce the issue

<template>
...
</template>

<script setup lang="ts">
import { jarallax } from 'jarallax';
...
</script>
POGREMIX commented 5 months ago

Need to move script to plugins directory and add client suffix