vitejs / vite-plugin-vue

Vite Vue Plugins
MIT License
477 stars 152 forks source link

Use vue built-in components Transition and KeepAlive build product not render content #411

Open aurora-lch opened 4 months ago

aurora-lch commented 4 months ago

Describe the bug

`

` use this code, when i build and deploy service. render is normal but keepalive invalidation

`

` use this code, local dev environment is normal but deploy service, only cached component not render

what i did wrong

Reproduction

https://stackblitz.com/edit/vitejs-vite-22ic9p?file=Demo.vue

Steps to reproduce

`<RouterView #default="{ Component }">

    </RouterView>`

use this code, when i build and deploy service. render is normal but keepalive invalidation

` <RouterView #default="{ Component }">

      </RouterView>

` use this code, local dev environment is normal but deploy service, only cached component not render

what i did wrong

System Info

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M2
    Memory: 255.42 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - /usr/local/bin/node
    Yarn: 1.22.21 - /usr/local/bin/yarn
    npm: 10.2.4 - /usr/local/bin/npm
  Browsers:
    Chrome: 125.0.6422.113
    Safari: 17.4.1
  npmPackages:
    @vitejs/plugin-vue: ^5.0.3 => 5.0.4 
    @vitejs/plugin-vue-jsx: ^3.1.0 => 3.1.0 
    vite: ^5.2.10 => 5.2.10

Used Package Manager

npm

Logs

No response

Validations

stackblitz[bot] commented 4 months ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

edison1105 commented 1 week ago

Please make sure your reproduction is valid and can reproduce the problem.