Skip to content

Template is never being cached #12018

@dev-at-sevenlab-nl

Description

@dev-at-sevenlab-nl

Vue version

3.5.8

Link to minimal reproduction

https://gitlab.com/julie41/demo-ionic-vue-router-unittest/-/tree/main

Steps to reproduce

  • go to https://gitlab.com/julie41/demo-ionic-vue-router-unittest/-/tree/main
  • Run npm i
  • Run npm run test
  • Both tests pass with the expected behaviour and logging
  • Update vue to 3.3.10 (or higher, currently lts is 3.5.8, but the issue is occurring from 3.3.10)
  • Run npm i
  • Run npm run test
  • The second tests is failing because the component within the ion router outlet is not mounted

What is expected?

I expect the same test output when updating vue to 3.3.10 or higher as when I run the tests with vue 3.3.9

What is actually happening?

Within this commit in vue 3.3.10 caching of rendering has changed. I notice that the render is stored in cache[key] which is not a global variable as compleCache[key] was. The cache is always overwritten in the compileToFunction function and therefore will never be true. This is causing problems in my tests. I'm thinking it is a bug that the render is not assigned to compileCache anymore. Can you fix or elaborate?

System Info

System:
    OS: macOS 14.3
    CPU: (8) arm64 Apple M1
    Memory: 126.83 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.17.0 - ~/.nvm/versions/node/v20.17.0/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v20.17.0/bin/npm
  Browsers:
    Chrome: 128.0.6613.138
    Edge: 129.0.2792.52
    Safari: 17.3
  npmPackages:
    vue: ^3.5.8 => 3.5.8

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions