1

In my Quasary CLI project I include my own js files like this:

import Task from "src/js/task.js"

When I change something in this file (task.js) and save it, my changes are not visible or functional with hot reload. However I see this in the console: [vite] hot updated: /src/components/kk-phase-tasks.vue

So hot reload seems to recognize a change and updates.

Even after reloading the page my changes are not build in.

Only after closing the dev server and start it again (quasar dev) my changes are reflected.

Do I have to define folders or files that vite should update? What am I missing?

kirschkern
  • 1,197
  • 10
  • 27

1 Answers1

13

The reason for Vite not updating my js files with hot reload was an uppercase letter in my import statement. My import was actually:

import Task from "src/js/Task.js"

but the filename is task.js (lowercase).

While the file will be included when the server starts, it will not be reloaded when the file changes.

kirschkern
  • 1,197
  • 10
  • 27