Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Vite Build Failing #55

Open
ehubbell opened this issue Oct 23, 2023 · 0 comments
Open

Vite Build Failing #55

ehubbell opened this issue Oct 23, 2023 · 0 comments

Comments

@ehubbell
Copy link

We recently upgraded our application from CRA to Vite and are running into issues with this library (and the agora-rtc-sdk-ng library) when trying to preview a build. I both scenarios, we get the following console error when trying to preview the build:

it is not a constructor or e is not a constructor with the stack trace originating from the Agora library import. We then tried dynamically importing the library, which allowed the page to load, but then ran into the issue again when we go to initialize the library.

Prior to Vite, we had the library working fine with CRA. And, we've tried configuring Vite with ESNext and ES2015 build targets using terser but none of those options have worked. We also tried to getting the Quick Demo React to work (available here: https://github.com/AgoraIO/agora-rtc-web/tree/main/projects/quick-demo-react) but that runs into an Agora-RTE-Extension--1.2.4.tgz not found 404 error when running pnpm i.

Any ideas on how to get the Vite build working?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant