|
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.
5 _3 ]3 j0 E/ z& ?# \7 }$ F& x+ [9 I
解决办法: 需要在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 }) } }
" p! r6 n& G- E9 @6 U |