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
Please see the reproduction repo (a barebones Vitejs project folder): /vite.config.js for flags configuration and /src/App.vue for an Options API component.
define: {
// No effect, it's still included
__VUE_OPTIONS_API__: 'false',
// Has the opposite effect: devtools will be enabled for prod builds!
// Commenting this out will disable devtools in prod builds.
__VUE_PROD_DEVTOOLS__: 'false',
// Has the opposite effect: mismatch details will be included in prod builds!
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false'
},
Run yarn build then serve the /dist folder. App.vue, which is an Options API component runs fine and executes its Options API definition.
Run yarn build with vite.config.js > __VUE_PROD_DEVTOOLS__: 'false',. Serve the /dist folder and notice that Vue Devtools is available and running. Then again with the vite.config.js __VUE_PROD_DEVTOOLS__ line commented out. Notice that Vue Devtools is not available.
What is expected?
Options API to not be included when define > __VUE_OPTIONS_API__ is set to false.
Vue Devtools not to be available for production builds when define > __VUE_PROD_DEVTOOLS__ is set to false.
Hydration mismatches will still be available in production builds when define > __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ is set to false.
What is actually happening?
Following the configuration from my reproduction repo:
Options API is still running fine. No build errors also.
Vue Devtools are available in production builds.
Hydration mismatches are still be available in production builds.
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered:
Vue version
3.5.13
Link to minimal reproduction
https://github.com/rstoenescu/vue-flags-bug
Steps to reproduce
Please see the reproduction repo (a barebones Vitejs project folder): /vite.config.js for flags configuration and /src/App.vue for an Options API component.
yarn build
then serve the /dist folder. App.vue, which is an Options API component runs fine and executes its Options API definition.yarn build
with vite.config.js >__VUE_PROD_DEVTOOLS__: 'false',
. Serve the /dist folder and notice that Vue Devtools is available and running. Then again with the vite.config.js__VUE_PROD_DEVTOOLS__
line commented out. Notice that Vue Devtools is not available.What is expected?
__VUE_OPTIONS_API__
is set to false.__VUE_PROD_DEVTOOLS__
is set to false.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__
is set to false.What is actually happening?
Following the configuration from my reproduction repo:
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: