|
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.
6 Y6 [' F W7 ?% A
解决办法: 需要在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 }) } } 4 B4 ^2 g5 i* h+ h- K& F4 k( [
|