Fix the problem of hot update error report caused by transition components

This commit is contained in:
chuan_wuhao 2022-08-29 11:51:20 +08:00
parent 4af5d743f1
commit 11dd9c3559
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<template>
<router-view v-slot="{ Component, route }">
<transition name="fade-transform" mode="out-in" appear>
<keep-alive include="Layout">
<keep-alive include="layout">
<component :is="Component" :key="route" />
</keep-alive>
</transition>

View File

@ -28,10 +28,10 @@ export default defineConfig(async ({ mode }) => {
plugins: [
vue({ reactivityTransform: true }),
vueJsx(),
ViteInspect(), // 仅适用于开发模式(检查 Vite 插件的中间状态)
ViteInspect(), // 仅适用于开发模式(检查 `Vite` 插件的中间状态)
VueI18nPlugin(),
useAutoImport(),
useViteComponents(),
await useAutoImport(),
await useViteComponents(),
useViteCompression(),
useVueI18nPlugin(),
useHTMLTitlePlugin(),
@ -46,7 +46,7 @@ export default defineConfig(async ({ mode }) => {
css: {
preprocessorOptions: {
scss: {
additionalData: '@import "./src/styles/mixins.scss";', // 全局mixin
additionalData: '@import "./src/styles/mixins.scss";', // 全局 `mixin`
},
},
},