-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Respect my jsxRuntime configuration #10670
Comments
This is how it should be configured. Would you expand about the JSX runtime junk? |
With I also use Storybook@7.0.45-alpha in my library to document components. It reuses my |
Umm, I'm not sure why that happens. Would you create a reproduction of that? |
Describe the bug
I am building a library of React components that I'd like to publish without automatic JSX runtime. In previous versions of
vite
and@vitejs/plugin-react
I was able to build my library withoutvite
polluting mydist
directory with JSX runtime junk. I updated bothvite
and@vitejs/plugin-react
and the option to useclassic
jsxRuntime does not work as expected in combination withjsx
option intypescript.config.ts
.I have externalized both
react
andreact-dom
as described in the docs.The option
jsx: 'preserve'
intypescript.config.ts
returns a Rollup error.The option
jsx: 'react-jsx
intypescript.config.ts
pollutes mydist
directory with JSX runtime junk.The option
jsx: 'react'
keepsdist
clean, but only in my reproduction case. Locally, where I have dozens of components, it adds JSX runtime junk.This used to work in earlier versions of
vite
and@vitejs/plugin-react
Reproduction
https://stackblitz.com/edit/vitejs-vite-kosz8e?terminal=dev
Steps to reproduce
Go to reproduction link and run
npm run build
with different options described above.System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: