Hi,
I’d like to suggest including the "localhost" prefix in the list of development domains inside the detect-dev-staging-domain.php https://github.com/wpmetabox/library/blob/master/composer/composer.json file. This would help automatically detect local environments (e.g., http://localhost, http://localhost:8000) and avoid incorrect environment assumptions during local development.
Several applications and development environments use "localhost" as a prefix. Some examples include:
XAMPP, MAMP, WAMP, LAMPP
Laravel (with php artisan serve)
Symfony (built-in server)
Flask
Django
Node.js (with tools like Vite, React, Angular, Vue CLI)
Webpack Dev Server, Parcel
Docker (ports mapped to localhost)
DDEV, Lando, DevKinsta, LocalWP
Testing tools like Cypress and Selenium
For this reason, it is common and recommended to treat "localhost" as a development domain.
I suggest adding support for the localhost prefix in the detect-dev-staging-domain.php file to help properly detect local environments.
*.localhost
Thanks!