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
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.
This is happening because useDefineForClassFields is true for Vite 3.1.4+.
If you set useDefineForClassFields: false in tsconfig.json, the test won't fail.
I'm not sure why it was false before Vite 3.1.4, but I think the current behavior is correct.
Describe the bug
My tests (vitest) started to fail after update to 3.1.4. Not a big deal the workaround is simple, but I prefer to share the info.
belgattitude/http-exception#83
Seems related to the change of esbuild target in dev: refs #10215 and #10207.
It's about the Error.cause, see usage https://belgattitude.github.io/http-exception/#/?id=about-errorcause
Here's the test that fails
https://github.com/belgattitude/http-exception/blob/599fa76113c3fc53c71e935133f52cabe13423cf/packages/http-exception/src/base/__tests__/HttpException.test.ts#L36-L48
As a workaround I've just set explicitly the target to node14 (many targets works, just not esnext).
https://github.com/belgattitude/http-exception/pull/82/files#diff-bf307cafcebcb7d56cd0b4a3017f12f6a1ba9a768ecd1de52df5c77158cf2e78
Not knowledgeable enough to know if it's important. Just wanted to share, please feel free to close.
By the way, thanks a lot for the work you're doing 👍
Reproduction
belgattitude/http-exception#83
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: