首页 前端知识 Feature flag __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ is not explicitly defined.

Feature flag __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ is not explicitly defined.

2024-03-03 11:03:37 前端知识 前端哥 830 250 我要收藏

vue.config.js文件中

增加 VUE_PROD_HYDRATION_MISMATCH_DETAILS: false,

const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  chainWebpack: (config) => {
    config.plugin("define").tap((definitions) => {
      Object.assign(definitions[0], {
        __VUE_OPTIONS_API__: "true",
        __VUE_PROD_DEVTOOLS__: false,
        __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false,
      });
      return definitions;
    });
  },
});

参考:https://vuejs.org/api/compile-time-flags

转载请注明出处或者链接地址:https://www.qianduange.cn//article/3132.html
标签
评论
会员中心 联系我 留言建议 回顶部
复制成功!