马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
main.ts:7 Feature flag__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ is not explicitly defined. You arerunning the esm-bundler build of Vue, which expects these compile-time featureflags to be globally injected via the bundler config in order to get bettertree-shaking in the production bundle. ^* D: W# i! C( }3 {4 J
解决办法: 需要在vue.config.js文件中添加配置: const { defineConfig } =require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true }) module.exports = { 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 }) } }
. _9 o% z+ j& F; d7 R |