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

Vite Build Failing #55

@ehubbell

Description

@ehubbell

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions