|
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. ; G! h! k L6 E2 E
解决办法: 需要在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 }) } }
* A. }* ?* z# J1 ~4 z |