Vite ‘global is not defined’
The problem is because vite doesn’t define a global field in window as webpack does. And some libraries relies on it since webpack is much more older than vite. Just insert at the very start, before any library import: // init.js window.global ||= window; A good way to have the above code before any import … Read more