Subscribe on changes!

Production mode html cache bug

avatar
Sep 24th 2022

Vue version

3.2.39

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-ktlfbn?file=index.html,src%2FApp.vue,src%2Fcomponents%2Flogin.vue,package.json&terminal=preview

Steps to reproduce

  1. Go to reproduction link (preview [Production mode]) and https://stackblitz.com/edit/vitejs-vite-ktlfbn?file=index.html,src%2FApp.vue,src%2Fcomponents%2Flogin.vue&terminal=dev (dev verison [Development mode])
  2. Click to "Toggle login" button
  3. Press "Close Modal"
  4. Repeat from 2. step

What is expected?

In development mode and production mode, the result should be the same (the word "test" should only be shown the first time)

What is actually happening?

In development mode word "test" is not shown after repeating the steps In production mode word "test" is there every time when component renders.

System Info

System:
    OS: Linux 5.13 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
    Memory: 48.66 GB / 62.68 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
Binaries:
    Node: 17.9.0 - /usr/bin/node
    npm: 8.19.1 - /usr/bin/npm
Browsers:
    Chrome: 104.0.5112.79
    Firefox: 104.0

Any additional comments?

No response