Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable To Use "Stoplight Elements" In React Vite App - require is not defined #2216

Closed
aerialist7 opened this issue Aug 12, 2022 · 1 comment

Comments

@aerialist7
Copy link
Contributor

aerialist7 commented Aug 12, 2022

Hi Team,

we're using <API/> react component from @stoplight/elements in our Vite/React project.
But the app doesn't work in production - it fails with Uncaught ReferenceError: require is not defined error.

Sample: https://github.com/aerialist7/stoplight-elements-sample/tree/vite-react-component
To reproduce the issue just run preview command in my sample.

Could you please help us to fix it?

relates #2084
cc @lottamus

@aerialist7 aerialist7 changed the title Unable To Use "Stoplight Elements" In React Vite App Unable To Use "Stoplight Elements" In React Vite App - require is not defined Aug 12, 2022
@chohmann
Copy link
Contributor

Hello!

Our team recently took over the stewardship of the elements repo.

Due the volume of un-triaged issues that are pretty old and the time it would take us to get caught up on all of them, we kindly ask that you open up a new ticket if this is still an issue you're struggling with.

If you open a new issue please include:

  • clear steps to reproduce that include example OAS specs, application setup, code, etc.
  • the error or issue you are experiencing
  • the expected behavior

We will be triaging any new tickets in a timely manner.

Thank you for understanding!

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

No branches or pull requests

2 participants