How to config vite.js to use node_module libraries in svelte-kit. #3059
Easy-Cloud-in
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I installed npm install locomotive-scroll
and called it in .svelte file like this
import LocomotiveScroll from 'locomotive-scroll';
I get the following error:
ReferenceError: document is not defined
at /node_modules/locomotive-scroll/dist/locomotive-scroll.esm.js:255:7
at instantiateModule (E:\ec-website\svelte-next\website\node_modules\vite\dist\node\chunks\dep-66eb515d.js:69030:166)
Beta Was this translation helpful? Give feedback.
All reactions