Closed kylecotter closed 2 years ago
On vacation at the moment, so have done nothing to vette this with Vite 3 yet.
Let me know if you find any info on how they are recommending you check for the devServer
running in Vite 3.
Looked into this briefly because I'd love to move to Vite 3 soon-ish, but will probably wait until a couple point releases come out and things are more settled 😅
Anyway, I didn't find a solution, but here are some PRs for future reference that had a direct bearing on the change:
Looks like this might be the way: https://github.com/vitejs/vite/pull/6819/files
So just try the raw dev server, and if I get a 400
it's running, and if it just can't connect at all, it isn't.
Addressed in:
Craft 3: Version 1.0.27 -> https://github.com/nystudio107/craft-vite/releases/tag/1.0.27
Craft 4: Version 4.0.2 -> https://github.com/nystudio107/craft-vite/releases/tag/4.0.2
Describe the bug
The
checkDevServer
config setting when set totrue
is not having the desired effect when using it with Vite 3. Currently, when running the Vite dev server, this config setting needs to befalse
or not set for any assets to generate.Similar comment here but splitting out into its own ticket.
To reproduce
Steps to reproduce the behaviour:
checkDevServer
totrue
inconfig/vite.php
vite
commandExpected behaviour
Previous functionality with Vite 2 exists where you can set the
checkDevServer
setting and have the Vite Craft plugin determine whether to inject assets or read from a manifest file based on the dev server running or not.Versions
Thanks!