Closed angelokeirsebilck closed 2 years ago
So this ended up being pretty interesting.
Addressed in: https://github.com/nystudio107/craft-vite/commit/29d4dae6b810828bb62ef4ef701f59d83565512b & https://github.com/nystudio107/craft-vite/commit/2255a0dadcb11f0c34153258bf7d97de74d5edfd
Craft CMS 3:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-vite": "dev-develop as 1.0.28",
Then do a composer clear-cache && composer update
…..
Craft CMS 4:
You can try it now by setting your semver in your composer.json
to look like this:
"nystudio107/craft-vite": "dev-develop-v4 as 4.0.3”,
Then do a composer clear-cache && composer update
Verify for me that this works for you, and I will cut a release.
Describe the bug
Error entry does not get injected in twig after a twig error occurs which is stopping the dev server and preventing from the page to reload after fixing the twig error.
To reproduce
Steps to reproduce the behaviour:
Expected behaviour
After we produce a twig error, we expect the plugin to inject the errorEntry inside twig so the dev server keeps running and allowing the HMR to take place when we fix the twig error.
Screenshots
I've set the checkDevServer to false and useDevServer to true for testing purpose. Seems like the check on line 166 inside ViteService.php is always false. So the devServerRunning function is always returning false resulting in not injecting the errorEntry.
Happily to provide more info if needed.
Versions