English | 简体中文
Vite adapters for deploying SSR and SPA applications to EdgeOne Makers.
- Zero-config deployment to EdgeOne Makers
- Automatic build artifact detection and bundling
- Server code bundling with NFT dependency tracing
- Route-aware config.json generation (Build Output API v3)
- pnpm monorepo support
- ESM interop handling for complex framework dependencies
# npm
npm install -D @edgeone/vite
# pnpm
pnpm add -D @edgeone/vite
# yarn
yarn add -D @edgeone/viteFramework-specific adapters are also available:
# React Router v7
npm install -D @edgeone/react-router
# TanStack Start
npm install -D @edgeone/tanstack-start- Node.js >= 18
- Vite ^5.0.0 || ^6.0.0 || ^7.0.0
// vite.config.ts
import { defineConfig } from "vite";
import edgeoneViteAdapter from "@edgeone/vite";
export default defineConfig({
plugins: [
edgeoneViteAdapter({
ssr: true, // set to false for SPA-only
}),
],
});// vite.config.ts
import { reactRouter } from "@react-router/dev/vite";
import { defineConfig } from "vite";
import edgeoneReactRouterAdapter from "@edgeone/react-router";
export default defineConfig({
plugins: [
reactRouter(),
edgeoneReactRouterAdapter(),
],
});// vite.config.ts
import { defineConfig } from "vite";
import { TanStackStart } from "@tanstack/react-start/plugin/vite";
import edgeoneTanStackStartAdapter from "@edgeone/tanstack-start";
export default defineConfig({
plugins: [
TanStackStart(),
edgeoneTanStackStartAdapter(),
],
});After building (vite build), deploy the .edgeone/ output directory to EdgeOne Makers.
| Package | Version | Description |
|---|---|---|
@edgeone/vite-core |
Core plugin: build artifact handling, bundling, config generation | |
@edgeone/vite |
Base adapter for native Vite (SPA/SSR/Vike) | |
@edgeone/react-router |
React Router v7 adapter | |
@edgeone/tanstack-start |
TanStack Start adapter |
This repository is a pnpm workspace. npm and yarn are not supported for local development (a preinstall guard will reject them).
# Install dependencies (requires pnpm; Node.js >= 18, recommended 20)
pnpm install
# Build all packages
pnpm build
# Clean build artifacts
pnpm run cleanContributions are welcome! Please open a GitHub Issue or submit a Pull Request.