{"id":15480121,"url":"https://github.com/tyler36/ddev-vite","last_synced_at":"2026-03-12T09:37:51.413Z","repository":{"id":241457952,"uuid":"781313945","full_name":"tyler36/ddev-vite","owner":"tyler36","description":"Basic Vite implementation for DDEV","archived":false,"fork":false,"pushed_at":"2025-03-13T00:32:26.000Z","size":76,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T14:34:12.163Z","etag":null,"topics":["ddev","ddev-get","hacktoberfest","vitejs"],"latest_commit_sha":null,"homepage":"https://github.com/tyler36/ddev-vite","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyler36.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-03T06:34:27.000Z","updated_at":"2025-03-13T00:32:29.000Z","dependencies_parsed_at":"2024-10-23T08:29:21.010Z","dependency_job_id":"507ea4c0-604b-4b35-8612-e9e20a960f4b","html_url":"https://github.com/tyler36/ddev-vite","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"5aeb7fe8ef6a52c28dd76663721e699b7d8bcab5"},"previous_names":["tyler36/ddev-vite"],"tags_count":1,"template":false,"template_full_name":"ddev/ddev-addon-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2Fddev-vite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2Fddev-vite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2Fddev-vite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler36%2Fddev-vite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyler36","download_url":"https://codeload.github.com/tyler36/ddev-vite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997001,"owners_count":21195785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ddev","ddev-get","hacktoberfest","vitejs"],"created_at":"2024-10-02T04:40:42.418Z","updated_at":"2025-10-26T15:37:31.514Z","avatar_url":"https://github.com/tyler36.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![add-on registry](https://img.shields.io/badge/DDEV-Add--on_Registry-blue)](https://addons.ddev.com)\n[![tests](https://github.com/tyler36/ddev-vite/actions/workflows/tests.yml/badge.svg)](https://github.com/tyler36/ddev-vite/actions/workflows/tests.yml)\n[![last commit](https://img.shields.io/github/last-commit/tyler36/ddev-vite)](https://github.com/tyler36/ddev-vite/commits)\n\n# ddev-vite \u003c!-- omit in toc --\u003e\n\n- [What is ddev-vite?](#what-is-ddev-vite)\n- [Components of the repository](#components-of-the-repository)\n- [Getting started](#getting-started)\n  - [Automatically start ViteJs](#automatically-start-vitejs)\n\n## What is ddev-vite?\n\n[ViteJs](https://vitejs.dev/) is a modern bundler, designed to be fast.\n\nThis add-on is a low-config option that exposes Vite's default port from DDEV so you can view the page in your browser.\nIt is based on the article [Working with Vite in DDEV - an introduction](https://ddev.com/blog/working-with-vite-in-ddev/), by Matthias Andrasch.\nDevelopers are responsible for installing, maintaining, and running the Vite server. This add-on only exposes the port.\n\n## Components of the repository\n\n- [config.vite.yaml](config.vite.yaml): configure DDEV to expose the port.\n- [install.yaml](install.yaml): describes how to install the service or other component.\n- [test.bats](tests/test.bats): test suite to confirm add-on continues to work as expected.\n- [Github actions setup](.github/workflows/tests.yml): automates daily tests and on pull requests.\n\n## Getting started\n\nThis add-on assumes the developer has:\n\n- Installed ViteJs via their preferred package manager.\n- A valid ViteJS configuration file is present in the project root.\n\n1. Install the add-on and restart DDEV\n\n```shell\nddev add-on get tyler36/ddev-vite\nddev restart\n```\n\n1. Update `vite.config.js`\n\n```js\nconst port = 5173;\nconst origin = process.env.DDEV_PRIMARY_URL;\n\nexport default defineConfig({\n    ...\n    // Adjust Vites dev server for DDEV: https://vitejs.dev/config/server-options.html\n    server: {\n        // The following line is require until the release of https://github.com/vitejs/vite/pull/19241\n        cors: { origin },\n        // ----------------\n        host: '0.0.0.0',\n        port: port,\n        origin: `${origin}:${port}`,\n        strictPort: true\n    },\n});\n```\n\n1. Start Vite inside the container.\n\n```shell\nddev npn run dev\n```\n\n### Automatically start ViteJs\n\nTo automatically start the ViteJs server, update DDEV `post-start` hook in `.ddev/config.yaml`.\nFor example:\n\n```yaml\nhooks:\n  post-start:\n    - exec: npm run dev\n```\n\n**Contributed and maintained by [@tyler36](https://github.com/tyler36)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyler36%2Fddev-vite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyler36%2Fddev-vite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyler36%2Fddev-vite/lists"}