From 41ce524e9a64e88ab78e310b98a124d9b5b0104b Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 15 May 2022 22:47:43 -0400 Subject: [PATCH 1/2] fix: Fixed an issue where the plugin couldn't detect the Vite dev server by testing `__vite_ping` instead of `@vite/client` to determine whether the dev server is running or not ([#33](https://github.com/nystudio107/craft-vite/issues/33)) ([#8](https://github.com/nystudio107/craft-plugin-vite/issues/8)) --- src/services/ViteService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/ViteService.php b/src/services/ViteService.php index b9865cd..1a771c9 100755 --- a/src/services/ViteService.php +++ b/src/services/ViteService.php @@ -32,6 +32,7 @@ class ViteService extends Component // ========================================================================= protected const VITE_CLIENT = '@vite/client'; + protected const VITE_DEVSERVER_PING = '__vite_ping'; protected const LEGACY_POLYFILLS = 'vite/legacy-polyfills'; // Public Properties @@ -170,7 +171,7 @@ public function devServerRunning(): bool return true; } // Check to see if the dev server is actually running by pinging it - $url = FileHelper::createUrl($this->devServerInternal, self::VITE_CLIENT); + $url = FileHelper::createUrl($this->devServerInternal, self::VITE_DEVSERVER_PING); $this->devServerRunningCached = !($this->fetch($url) === null); return $this->devServerRunningCached; From d99a7303ce3140eefe5befb1b0c3e7b8bad769cd Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Sun, 15 May 2022 22:48:02 -0400 Subject: [PATCH 2/2] chore: Version 4.0.1 --- CHANGELOG.md | 4 ++++ composer.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6561b4f..495a125 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Plugin Vite Changelog +## 4.0.1 - 2022.05.15 +### Fixed +* Fixed an issue where the plugin couldn't detect the Vite dev server by testing `__vite_ping` instead of `@vite/client` to determine whether the dev server is running or not ([#33](https://github.com/nystudio107/craft-vite/issues/33)) ([#8](https://github.com/nystudio107/craft-plugin-vite/issues/8)) + ## 4.0.0 - 2022.05.07 ### Added * Initial release for Craft CMS 4 diff --git a/composer.json b/composer.json index 1a4c1c4..7055a94 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "nystudio107/craft-plugin-vite", "description": "Plugin Vite is the conduit between Craft CMS plugins and Vite, with manifest.json & HMR support", - "version": "4.0.0", + "version": "4.0.1", "keywords": [ "craftcms", "plugin",