Licence
MIT
Version
0.12.1
Deps
2
Size
29 kB
Vulns
0
Weekly
0
Vixt
Introduction
Vixt is a Vite plugin designed to improve developer experience (DX), inspired by Nuxt. The name combines the first two letters of Vite and the last two letters of Nuxt.
Vixt aims to bring Nuxt-style productivity features to popular modern frameworks such as Vue, React, and Uni-app. It includes filesystem routing, layouts, auto-imports, plugins, modules, layers, server-side features, and more. Built on Vite 8 for faster development and build speed, Nitro provides the ability to build full-stack applications.
Installation
Try Vitesse built with Vixt
Create a Vixt project
Vixt recommends using pnpm with a monorepo setup, and the default project templates are monorepo-based.
# Default monorepo template, including vue and uni-app projects
pnpm create vixt my-project
# Vue single-project
# pnpm create vixt my-project --template vue-ts
# Uni-app single-project
# pnpm create vixt my-project --template uni-ts
# React single-project
# pnpm create vixt my-project --template react-ts
Use in an existing project
- Remove duplicate dependencies in
package.jsonthat Vixt already provides (such asvue,vite, etc., if not required). - Create a
.npmrcfile and enable pnpm'sshamefully-hoist:
shamefully-hoist=true
- Install Vixt:
pnpm add vixt
- Create
vixt.config.ts:
import { defineVixtConfig } from 'vixt'
export default defineVixtConfig({})
- Update
vite.config.ts:
import { defineConfig } from 'vite'
import vixt from 'vixt/vue'
export default defineConfig({
plugins: [vixt()],
})
- Update
tsconfig.json:
{
"extends": "./.vixt/tsconfig.json"
}
Packages
| Package | Description |
|---|---|
| vixt | Central package for all Vixt packages |
| @vixt/core | Core foundation of Vixt |
| @vixt/vue | Vue adapter layer |
| @vixt/uni | Uni-app adapter layer |
| @vixt/vitepress | VitePress adapter layer |
| @vixt/react | React adapter layer |
| create-vixt | Project scaffolding tool |
Thanks
This project is highly inspired by Nuxt and Vite.
Thanks to UnJS for creating helpful packages.