From f1cb22c5afa2729dcdd83799ca8b89dd844fd387 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 ce7937e9..0950b77f 100644 --- a/src/content/blog/working-with-vite-in-ddev.md +++ b/src/content/blog/working-with-vite-in-ddev.md @@ -499,6 +499,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)