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.
sh
# 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-tsUse 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:
sh
pnpm add vixt- Create
vixt.config.ts:
ts
import { defineVixtConfig } from 'vixt'
export default defineVixtConfig({})- Update
vite.config.ts:
ts
import { defineConfig } from 'vite'
import vixt from 'vixt/vue'
export default defineConfig({
plugins: [vixt()],
})- Update
tsconfig.json:
json
{
"extends": "./.vixt/tsconfig.json"
}