admin管理员组文章数量:1650768
Feature flag __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.
不知道什么时候控制台就出现了一个黄色警告,刚开始没在意,觉得我代码写完应该就没了,结果一直在……有点点强迫症,就搜了一下解决办法[😁],但是那位博主加的有点多,我就加了几句也解决了,就没管其他的了。(啰嗦如我)
在vite.config.ts里面加这一段:
import { defineConfig } from "vite";
export default defineConfig({
define: {
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: "true",
},
});
OK,控制台干净了。
参考博文:
https://blog.csdn/cg_ssh/article/details/135396904
本文标签: Flagfeaturedefinedexplicitly
版权声明:本文标题:Feature flag __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ is not explicitly defined... 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1729531500a1204864.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论