KO
|
EN
gitlite — search
Search
#typescript
#ai-agents
#ai
#dsh-plugin
#deepseek-harness
#open-source
#cli
#claude-code
#codex
#developer-tools
#react
#windows
elysia-vite
★ 79
Open GitHub ↗
No description available.
Download README (.md)
Explore Similar Repositories
developer-experience-java-kubernetes
:
Samples showing how to use different tools and patterns to improve the developer experience and optimise the inner development loop.
azure-remix-stack
:
A remix stack template for running a remix app on Azure
aws-machine-learning-university-responsible-ai
:
No description available.
better-nav
:
一个把常用网址收拾得干干净净的小站
mantine-split-pane
:
A Mantine 9 React component for resizable split pane layouts with 7 resizer variants, context-based prop inheritance, responsive orientation, and dynamic pane generation.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
elysia-vite
?
Download (.md)
# elysia-vite  Simple [Elysia](https://elysiajs.com/) plugin that helps you use Vite. It serve your entry html file with Vite's scripts injected. ## 1. Installation ### 1.1. Vite and plugins Please follow [Vite's offical document](https://vitejs.dev/guide/). The following code is my simple React setup. ```bash # Bash: # Install vite itself bun add vite -d # add your Vite's plugin, DO NOT RUN if you aren't using React. bun add @vitejs/plugin-react -d ``` ```js // File: vite.config.ts import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; // https://vitejs.dev/config/ export default defineConfig({ root: "src/client", // replace with your frontend code dir plugins: [ react() // replace with your plugin ], }); ``` ### 1.2. `elysia-vite` ```bash bun add elysia-vite ``` ## 2. Usage ### Use Elysia `elysia-vite` plugin ```js // File: index.ts const {Elysia} = require('elysia') const {elysiaVite} = require('elysia-vite') const app = new Elysia() // 1. use as plugin .use(elysiaVite({ base: '/app', // url path to serve index.html file or leave blank to serve as root path viteConfigFile: `${import.meta.dir}/vite.config.ts`, // absolute path to your vite config file entryHtmlFile: `${import.meta.dir}/src/client/index.html`, // absolute path to your entry html file entryClientFile: `${import.meta.dir}/src/client/index.tsx`, // absolute path to your entry script file isReact: true, // inject React's specific HMR code @see https://vitejs.dev/guide/api-hmr.html placeHolderDevScripts: '<!--vite-dev-scripts-->', // placeholder to replace vite scripts })) .listen(3000) // goto http://localhost:3000/app ```