Vite.js requires global and process polyfills
If you’re using Vite.js with React and the Layerswap Widget, you may encounter this error in your console:process module, which is not available in the browser environment and is not automatically polyfilled by Vite.
Polyfill process using vite.config.js
To resolve this, modify your vite.config.js file to configure esbuild with the necessary polyfills: