Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR: PUG template updates issue #76

Closed
7 tasks done
men232 opened this issue Jan 2, 2023 · 0 comments
Closed
7 tasks done

HMR: PUG template updates issue #76

men232 opened this issue Jan 2, 2023 · 0 comments
Labels
bug Something isn't working feat: hmr p3-minor-bug 🔨 An edge case that only affects very specific usage (priority)

Comments

@men232
Copy link

men232 commented Jan 2, 2023

Describe the bug

While updating script or template (pug) section of vue3 component i get an error in console, i need a few times to update a file + refresh the page to keep working. With HTML templates all good.

[Vue warn]: Property "testVariable" was accessed during render but is not defined on instance. 

Reproduction

https://codesandbox.io/s/determined-shtern-6slyjc?file=/src/views/PugExample.vue

Steps to reproduce

  1. Run dev server
  2. Open PugExample.vue
  3. Change the variable name from testVariable to testVariable2 in template & script section.
  4. Look at the console.

P.S. Sometimes it works, just keep changing the name of the variable until you get an error.

System Info

System:
    OS: macOS 11.7.1
    CPU: (8) x64 Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
    Memory: 1.37 GB / 24.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 18.7.0 - ~/.nvm/versions/node/v18.7.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.7.0/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v18.7.0/bin/npm
  Browsers:
    Chrome: 108.0.5359.124
    Firefox: 107.0.1
    Safari: 16.2
  npmPackages:
    @vitejs/plugin-vue: ^4.0.0 => 4.0.0
    vite: ^4.0.0 => 4.0.3

Used Package Manager

npm

Logs

vite:hmr [file change] src/views/PugExample.vue +11s
vite:hmr [vue:update(template)] /Users/{whoami}/Sandbox/vue-clean-project/src/views/PugExample.vue +0ms
8:29:42 PM [vite] hmr update /src/views/PugExample.vue, /src/views/PugExample.vue?vue&type=template&lang.js
vite:load 0.08ms [plugin] /src/views/PugExample.vue?vue&type=template&lang.js +11s
vite:hmr [self-accepts] src/views/PugExample.vue?vue&type=template&lang.js +39ms
vite:import-analysis 1.01ms [1 imports rewritten] src/views/PugExample.vue?vue&type=template&lang.js +11s
vite:transform 9.92ms /src/views/PugExample.vue?vue&type=template&lang.js +11s
vite:time 11.37ms /src/views/PugExample.vue?vue&type=template&lang.js +11s
vite:cache [memory] /node_modules/.vite/deps/vue.js?v=d2275782 +11s
vite:load 12.65ms [fs] /src/views/PugExample.vue +11ms
vite:hmr [self-accepts] src/views/PugExample.vue +7ms
vite:import-analysis 2.84ms [2 imports rewritten] src/views/PugExample.vue +7ms
vite:transform 4.76ms /src/views/PugExample.vue +6ms
vite:time 19.77ms /src/views/PugExample.vue +7ms
vite:cache [memory] /src/views/PugExample.vue?vue&type=template&lang.js +7ms
vite:cache [memory] plugin-vue:export-helper +0ms

Validations

@sapphi-red sapphi-red transferred this issue from vitejs/vite Jan 3, 2023
@sapphi-red sapphi-red added bug Something isn't working feat: hmr p3-minor-bug 🔨 An edge case that only affects very specific usage (priority) and removed pending triage labels Jan 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working feat: hmr p3-minor-bug 🔨 An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants