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
Vite describes in the docs that define values should be a string with a json value, or any value that will automatically be json stringified later. VUE_PROD_DEVTOOLS, VUE_PROD_HYDRATION_MISMATCH_DETAILS, and VUE_OPTIONS_API are forced to true by this plugin if given a string value.
I'm using the quasar framework for some production apps and in their latest beta/rc they stringify all the defines before passing them to vite. If they are in the wrong for doing that, I'll open an issue with them.
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
Vite describes in the docs that define values should be a string with a json value, or any value that will automatically be json stringified later. VUE_PROD_DEVTOOLS, VUE_PROD_HYDRATION_MISMATCH_DETAILS, and VUE_OPTIONS_API are forced to true by this plugin if given a string value.
This code: https://github.com/vitejs/vite-plugin-vue/blob/599f81369816aca918314e86f5b0a6e32367bb38/packages/plugin-vue/src/index.ts#L244C1-L258C1 does not respect a falsy value if it is already stringified.
I'm using the quasar framework for some production apps and in their latest beta/rc they stringify all the defines before passing them to vite. If they are in the wrong for doing that, I'll open an issue with them.
Reproduction
https://github.com/jacobfrantz1/vite-vue-issue-repro
Steps to reproduce
Run
npm install
,npm run build
andnpm run preview
. See that devtools are enabled in production althoughis in the vite config.
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: