Skip to content

teodorlu/swagger-ui-on-vite

Repository files navigation

Vite & Swagger UI polyfill issues - minimal example

Related discussion in PR on Swagger UI repo: swagger-api/swagger-ui#7898

Rationale

Installing and using swagger-ui-react fails out of the box on applications that use Vite.js. Why?

This repo is a minimal reproduction of those issues.

Steps to get here

  1. npm create vite@latest swagger-ui-on-vite
  2. Pick "react" and "react-ts"
  3. For a dev build, run npm run dev
  4. Remove default stuff main.tsx - and styling
  5. npm install --save swagger-ui-react @types/swagger-ui-react
  6. Import and use the SwaggerUI component
  7. Observe errors when opening the app:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published