DDEVDDEV addon that provides Vite+ commands to run inside your DDEV project.
Vite+ is the unified toolchain for the web, providing a complete development environment with Vite, package management, testing, and more.
In your DDEV project:
ddev add-on get somehow-digital/ddev-viteplus
ddev restart
ddev vpThe dev server container exposes Vite on:
https://<project>.ddev.site:5173/Internal Container Access: From other DDEV containers (e.g., PHP/web container), use:
http://viteplus:5173/When using the Vite Plugin, configure as follows:
config/vite.php
<?php
use craft\helpers\App;
return [
'useDevServer' => Craft::$app->config->general->devMode,
'checkDevServer' => true,
'devServerInternal' => 'http://viteplus:5173',
'devServerPublic' => App::env('DEFAULT_SITE_URL') . ':5173',
'serverPublic' => '/dist/',
'includeReactRefreshShim' => false,
'includeModulePreloadShim' => false,
'manifestPath' => '@webroot/dist/.vite/manifest.json',
];
vite.config.js
export default {
server: {
host: '0.0.0.0',
port: 5173,
allowedHosts: [
'viteplus',
],
},
}