acr*_*ene 4 javascript vue.js quasar-framework vuejs3 vite
我将 quasar 与 Vite 一起使用。安装 quasar 后,yarn create quasar 我在控制台中收到以下警告。
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ is not explicitly defined.
You are running the esm-bundler build of Vue, which expects these
compile-time feature flags to be globally injected via the bundler
config in order to get better tree-shaking in the production
bundle.
Run Code Online (Sandbox Code Playgroud)
我怎样才能摆脱它?我找不到任何关于在 Quasar Framework 中定义它的信息
升级到 Vue 3.4 后,如果没有升级所有其他必需的依赖项(即@vitejs/plugin-vue,应升级到 ^5.0.0),就会出现此警告。这记录在升级到 Vue 3.4 时所需的潜在操作下。
使用 Quasar,您无法直接升级此包,因为它不是 Quasar 项目的顶级依赖项。在 Quasar 团队发布更新之前,您需要自己设置标志
类星体.config.js
build: {
extendViteConf(viteConf) {
viteConf.define.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false
},
}
Run Code Online (Sandbox Code Playgroud)