Skip to content

Commit

Permalink
Merge branch 'release/4.0.1' into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed May 16, 2022
2 parents 54ba260 + d99a730 commit 204d8de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/services/ViteService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 204d8de

Please sign in to comment.