From 5ddc16f765b5ccbe7a78d29534b0f3f0e632368a Mon Sep 17 00:00:00 2001 From: Jon Dingman Date: Tue, 6 Aug 2024 18:17:29 -0500 Subject: [PATCH] Update working-with-vite-in-ddev.md Added language to start vite as a daemon --- src/content/blog/working-with-vite-in-ddev.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/content/blog/working-with-vite-in-ddev.md b/src/content/blog/working-with-vite-in-ddev.md index 9759c2ae..cd740e13 100644 --- a/src/content/blog/working-with-vite-in-ddev.md +++ b/src/content/blog/working-with-vite-in-ddev.md @@ -476,6 +476,14 @@ export default defineConfig({ The devserver can be started via `ddev npm run dev`. +If you want to run this in the background as a daemon, edit your config.yaml and add the this: +``` +web_extra_daemons: + - name: vite + command: bash -c 'npm install && npm run dev -- --host' + directory: /var/www/html +``` + Example repository: - [mandrasch/ddev-laravel-vite](https://github.com/mandrasch/ddev-laravel-vite)