ui-kit icon indicating copy to clipboard operation
ui-kit copied to clipboard

Error importing @propeldata/ui-kit in a React app created with vite

Open GabrielMusatMestre opened this issue 10 months ago • 1 comments

Describe the bug

When creating a fresh React application with vite, just importing @propeldata/ui-kit crashes with the following error:

Uncaught ReferenceError: process is not defined
    at @propeldata_ui-kit.js?v=24f201ae:23182:9
Screenshot 2024-04-11 at 11 58 36

To reproduce

Create a react app with vite

yarn create vite my-app --tempate react-ts

install @propeldata/ui-kit and create a any dummy component.

Desktop (please complete the following information)

  • OS: macOS
  • Browser: Chrome
  • UI Kit Version: 0.5.5

GabrielMusatMestre avatar Apr 11 '24 10:04 GabrielMusatMestre

Installing vite-plugin-node-polyfills and adding it to vite.config.ts seems to solve the issue

GabrielMusatMestre avatar Apr 11 '24 10:04 GabrielMusatMestre