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
Open src/components/HelloWorld.vue and look side by side with resulting page view. We see;
The first paragraph displays {{ JSON }}, and the JSON here is the object returned from setup function.
The second paragraph displays {{ JSON.toString() }}, and the JSON here is a standard object as can be seen from the resulting page shows [object JSON].
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.
Related plugins
plugin-vue
plugin-vue-jsx
Describe the bug
I am not exactly sure this is a bug of this plugin-in, sorry if this is not caused by this plugin-in.
Returning object of same name as standard object such as
JSON
orDate
fromsetup
function sometimes overrides standard object and sometimes not.Although I cannot reproduce, I have an environment overriding always occur.
Reproduction
https://stackblitz.com/edit/vitejs-vite-4y7scdda?file=src%2Fcomponents%2FHelloWorld.vue
Steps to reproduce
src/components/HelloWorld.vue
and look side by side with resulting page view. We see;{{ JSON }}
, and theJSON
here is the object returned fromsetup
function.{{ JSON.toString() }}
, and theJSON
here is a standard object as can be seen from the resulting page shows[object JSON]
.System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: