donnikitos / vite-plugin-php

Vite's speed and tooling to preprocess PHP-files!
https://www.npmjs.com/package/vite-plugin-php
MIT License
30 stars 0 forks source link

Should this be hot reloading automatically? #2

Closed christoferd closed 10 months ago

christoferd commented 11 months ago

Hi, Should this be hot reloading automatically?

When I edit the index.php file the page does not hot reload automatically. Vite output in CLI does notice the change and outputs this:

3:35:24 pm [vite] page reload src/index.php

donnikitos commented 11 months ago

Hi, the plugin is not hot reloading. Instead it does a full reload of the page. Have you added a proper entry to your config? Something like:

usePHP({
    entry: ['src/index.php'],
});

By default the plugin loads the index.php from the root, just like Vite would with the index.html.

donnikitos commented 10 months ago

I assume the reloading issue is resolved