You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I use @vite/plugin-react build project, I impot antd Form component in my project, when run "dist" in my server, deps is empty array useEffect cleanup is not work.
I find reason, because @vite/plugin-react default use 'jsxruntime', when set this options {jsxRuntime: 'classic'}, the cleanup is on work!
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Hey just tested inside codesanbox and the reset button is working in both case from my testing.
If you think there is an issue with useEffect in automatic runtime, this is either an issue with the lib (most probably) or with React (very low given the size of FB internal codebase).
While there is a very small chance a an error introduce by a minification issue, I think more people would have encounter it in the last months, so I'm closing for now. If you think this is the case, please provide an updated example on Stackblitz (can't download project on codesandbox 😕)
Describe the bug
when I use @vite/plugin-react build project, I impot antd Form component in my project, when run "dist" in my server, deps is empty array useEffect cleanup is not work.
I find reason, because @vite/plugin-react default use 'jsxruntime', when set this options {jsxRuntime: 'classic'}, the cleanup is on work!
Reproduction
https://codesandbox.io/p/sandbox/sleepy-hodgkin-lpc40v?file=%2Fvite.config.ts&selection=%5B%7B%22endColumn%22%3A8%2C%22endLineNumber%22%3A11%2C%22startColumn%22%3A8%2C%22startLineNumber%22%3A11%7D%5D&workspace=%257B%2522activeFileId%2522%253A%2522cl95khku20012luip4301gyja%2522%252C%2522openFiles%2522%253A%255B%2522%252FREADME.md%2522%252C%2522%252Fpackage.json%2522%252C%2522%252Fsrc%252Fmain.tsx%2522%252C%2522%252Fsrc%252FApp.tsx%2522%252C%2522%252Fvite.config.ts%2522%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522sidekickItems%2522%253A%255B%257B%2522type%2522%253A%2522PREVIEW%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522port%2522%253A5173%252C%2522key%2522%253A%2522cl9s933rs000k306is9uxb2yb%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D
Steps to reproduce
No response
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: