{"id":13417502,"url":"https://github.com/cyco130/vavite","last_synced_at":"2025-05-14T13:09:27.818Z","repository":{"id":37000240,"uuid":"435851425","full_name":"cyco130/vavite","owner":"cyco130","description":"Develop server-side applications with Vite","archived":false,"fork":false,"pushed_at":"2025-05-06T10:28:15.000Z","size":1760,"stargazers_count":497,"open_issues_count":17,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T11:42:00.389Z","etag":null,"topics":["nodejs","vitejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyco130.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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,"zenodo":null}},"created_at":"2021-12-07T11:20:53.000Z","updated_at":"2025-04-24T22:52:48.000Z","dependencies_parsed_at":"2023-12-23T07:24:18.246Z","dependency_job_id":"3115d1f6-f828-4989-8b17-5e609429e5e7","html_url":"https://github.com/cyco130/vavite","commit_stats":{"total_commits":206,"total_committers":8,"mean_commits":25.75,"dds":"0.23786407766990292","last_synced_commit":"c1d710fbb266217f8d290728356b35368dbb9573"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyco130%2Fvavite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyco130%2Fvavite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyco130%2Fvavite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyco130%2Fvavite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyco130","download_url":"https://codeload.github.com/cyco130/vavite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253660864,"owners_count":21943825,"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":["nodejs","vitejs"],"created_at":"2024-07-30T22:00:38.564Z","updated_at":"2025-05-14T13:09:22.800Z","avatar_url":"https://github.com/cyco130.png","language":"TypeScript","funding_links":[],"categories":["SSR","TypeScript","Plugins","vitejs"],"sub_categories":["Libraries"],"readme":"# Va vite!\n\n`vavite` is a set of tools for developing and building server-side applications with [Vite](https://vitejs.dev).\n\nVite, despite being a frontend tool, has support for transpiling server-side code. The feature is intended for building [server-side rendering (SSR)](https://vitejs.dev/guide/ssr.html) applications. But there's no reason why it can't be leveraged for building server-side applications that are not necessarily related to SSR. `vavite` lets you do that, but also vastly simplifies the SSR workflow.\n\nVite's official SSR guide describes a workflow where Vite's development server is used as a middleware function in a server application made with a [Connect](https://github.com/senchalabs/connect) compatible Node.js framework (like [Express](https://expressjs.com)). If your server-side code needs transpilation (e.g. for TypeScript), you're required to use another set of tools (say [`ts-node`](https://typestrong.org/ts-node/) and [`nodemon`](https://nodemon.io/)) for development and building. `vavite` enables you to use Vite itself to transpile your server-side code.\n\n## Examples\n\n- [simple-standalone](examples/simple-standalone): Simple standalone example ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/simple-standalone))\n- [express](examples/express): Integrating with Express ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/express))\n- [koa](examples/koa): Integrating with Koa ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/koa))\n- [fastify](examples/fastify): Integrating with Fastify ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/fastify))\n- [hapi](examples/hapi): Integrating with Hapi ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/hapi))\n- [ssr-react-express](examples/ssr-react-express): React SSR with Express ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/ssr-react-express))\n- [ssr-vue-express](examples/ssr-vue-express): Vue SSR with Express ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/ssr-vue-express))\n- [vike](examples/vike): Vike with React and Express ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/vike))\n- [socket-io](examples/socket-io): [socket.io](https://socket.io/) with Express ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/socket-io))\n- [Nest.js](examples/nestjs): [Nest.js](https://nestjs.com/) with Express ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/nestjs))\n- [Nest.js with vike](examples/nestjs-vike): [Nest.js](https://nestjs.com/) with Vike ([Stackblitz](https://stackblitz.com/github/cyco130/vavite/tree/main/examples/nestjs-vike))\n\n## Packages\n\n[`vavite`](packages/vavite) is the main package that should work for most workflows but it is built on a set of lower level tools that you can use independently:\n\n- [`@vavite/connect`](packages/connect) is a Vite plugin that turns the official SSR workflow around: Instead of mounting Vite's dev server into your application as a middleware function, you write your application in the form of a middleware function (with the `(req, res, next)` signature) and mount it into Vite's dev server. For production, you can provide a custom server entry or it can build a standalone Node.js server application for you. This workflow is best if you're only interested in handling requests and you don't need control over the server entry during development.\n\n- If you do need control over your server entry even during development, [`@vavite/reloader`](packages/reloader) is a Vite plugin that provides live reloading capabilities for applications written with _any_ Node.js server framework. It should be usable with any framework that allows you to provide your own `http.Server` instance. **Note that this is a less reliable method and some things don't work on some operating systems.**\n\n- [`@vavite/expose-vite-dev-server`](packages/expose-vite-dev-server) is a plugin that provides access to Vite's dev server by simply importing it. It's useful for accessing server methods like `ssrFixStacktrace` and `transformIndexHtml` during development using either `@vavite/connect` or `@vavite/reloader`.\n\n- Building an SSR application with Vite involves at least two invocations of Vite's build command: once for the client and once for the server. [`@vavite/multibuild`](packages/multibuild) provides a JavaScript API for orchestrating multiple Vite builds and [`@vavite/multibuild-cli`](packages/multibuild-cli) is a drop-in replacement for the `vite build` CLI command for invoking multiple builds.\n\n- [`@vavite/node-loader`](packages/node-loader) is a Vite plugin that makes it possible to debug SSR code with full support for sourcemaps and breakpoints. It uses a Node ESM loader behind the scenes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyco130%2Fvavite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyco130%2Fvavite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyco130%2Fvavite/lists"}