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 because your code does not work in strict mode. Also it is always strict mode inside ESM.
You could run the following code in devtools or rename src/test.js to src/test.mjs to reproduce it.
Describe the bug
When I migrate my project from vue-cli to vite,I encounter some problems, like that:
I find out that the problem comes from code like that:
Though it is unprecise, the code can run rightly in browser and node:
Why vite throw TypeError? The code comes from a third-party library,so I'm not able to modify it. Coluld vite svole the problem? Thanks.
Reproduction
https://stackblitz.com/edit/vitejs-vite-ugzs6j?file=main.js
System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: