Skip to content

Vite triggers reload for any file in any folder #324

@robsontenorio

Description

@robsontenorio

Laravel Version

12.7.2

PHP Version

8.4.2

Spec

NPM 10.9.0
macOS 15.3.2

Description

After upgrading from Laravel 11 to 12, I have noticed this strange issue where Vite triggers full page reload for any file in any folder changed.

I am using the default settings for vite.config.js and app.css

As the docs say, not all folders will be watched.

https://laravel.com/docs/12.x/vite#blade-refreshing-on-save

Steps To Reproduce

  • Bootstrap a Laravel 12 project with some starter kit (tested with Livewire starter kit).
  • Install PHP/JS dependencies.
  • npm run dev or yarn dev
  • Start browsing the site (without modifying any file)
  • While browsing, you will notice in some pages it will refresh unexpectedly , because storage/framework/*** changes.
  • Try to modify any file like config/*** or database/*** , it will also refresh.
# Pretty random, but annoying.

1:58:51 PM [vite] (client) page reload storage/framework/views/feb9523037ff1142795d520cc7a929f4.php

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions