Skip to content

How to Configure Vite Globals for UMD Build (ex. React-Icons) #228

Description

@portfolio-y0711

Hello. I am developing a UI using MUI in React-Google-Apps-Script with the boilerplate you provided. First, I would like to express my gratitude for carefully creating the README file and the package.json scripts, which are easy for beginners like me to follow. I mainly develop with MUI, but since the mui/material-icons library does not provide a UMD build, I found a library called React-Icons that offers a UMD build and I plan to use it as a replacement.

React-Icons
https://www.jsdelivr.com/package/npm/@oxygen-ui/react-icons

However, since I am not very familiar with using globals in Vite settings and UMD-style builds, I am unsure how to instruct the globals in the Vite config after loading the CDN in the HTML script tag as shown below.

Is there a specific naming convention I should follow?

Screenshot 2024-12-09 at 7 55 28 PM

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions