Closed judocode closed 2 years ago
Describe the bug Whenever the windi config file changes, HMR is triggered as well as a full page reload. The full page reload should not be necessary after the HMR and it looks like this is by design for some reason: https://github.com/windicss/vite-plugin-windicss/blob/124fb2fbbbe5c3421424060a2401ba292be4440f/packages/vite-plugin-windicss/src/index.ts#L129-L132
In my logs I see:
[vite] hmr update /@windicss/windi.css configure file changed, reloading
Minimal Reproductions https://github.com/judocode/vite-rails-docker If you run docker-compose up vite and then in a separate terminal docker-compose up app and then browse localhost:3000 and change the config file
docker-compose up vite
docker-compose up app
Versions
Additonal Context I saw this was once an issue with Vite https://github.com/vitejs/vite/issues/4150 but it has since been resolved.
Features like variants groups or @apply directives transform your code. A full reload is necessary to ensure everything is refreshed correctly.
@apply
Describe the bug Whenever the windi config file changes, HMR is triggered as well as a full page reload. The full page reload should not be necessary after the HMR and it looks like this is by design for some reason: https://github.com/windicss/vite-plugin-windicss/blob/124fb2fbbbe5c3421424060a2401ba292be4440f/packages/vite-plugin-windicss/src/index.ts#L129-L132
In my logs I see:
Minimal Reproductions https://github.com/judocode/vite-rails-docker If you run
docker-compose up vite
and then in a separate terminaldocker-compose up app
and then browse localhost:3000 and change the config fileVersions
Additonal Context I saw this was once an issue with Vite https://github.com/vitejs/vite/issues/4150 but it has since been resolved.