You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue when trying to use the Wheel Gesture Plugin with Embla Carousel for Svelte (embla-svelte).
I'm getting the following error in the browser: process is not defined.
My setup is using Embla-Svelte and another plugin, Autoplay, which works flawlessly.
Plugin that works: Autoplay
Plugin with issue: Wheel Gesture Plugin
This seems like an environment-related issue, possibly due to how the Wheel Gesture plugin is referencing a Node.js-specific global like process which isn't available in the browser (or in my SvelteKit/Vite build process).
Has anyone else experienced this with the Wheel Gesture Plugin in a Svelte/Vite environment, or does anyone know how to correctly configure the build (e.g., using define in Vite or a similar polyfill) to resolve the undefined process variable for this specific plugin?
Any guidance or ideas would be greatly appreciated!
If applicable, which variants of Embla Carousel are relevant to this question?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'm encountering an issue when trying to use the Wheel Gesture Plugin with Embla Carousel for Svelte (embla-svelte).
I'm getting the following error in the browser: process is not defined.
My setup is using Embla-Svelte and another plugin, Autoplay, which works flawlessly.
Plugin that works: Autoplay
Plugin with issue: Wheel Gesture Plugin
This seems like an environment-related issue, possibly due to how the Wheel Gesture plugin is referencing a Node.js-specific global like process which isn't available in the browser (or in my SvelteKit/Vite build process).
Has anyone else experienced this with the Wheel Gesture Plugin in a Svelte/Vite environment, or does anyone know how to correctly configure the build (e.g., using define in Vite or a similar polyfill) to resolve the undefined process variable for this specific plugin?
Any guidance or ideas would be greatly appreciated!
If applicable, which variants of Embla Carousel are relevant to this question?
Additional information
No response
CodeSandbox example
No response
Beta Was this translation helpful? Give feedback.
All reactions