Skip to content

Installation ​

Try Vitesse built with Vixt ​

vitesse-vixt

Create a Vixt project ​

Vixt recommends using pnpm with a monorepo setup, and the default project template is monorepo-based.

sh
# Default monorepo template, including vue, uni-app and react projects
pnpm create vixt my-project

Use in an existing project ​

  • Remove duplicate dependencies in package.json that Vixt already provides (such as vue, vite, etc., not required).
  • Create a .npmrc file and enable pnpm's shamefully-hoist:
shamefully-hoist=true
  • Install Vixt:
sh
pnpm add vixt @vixt/vue
  • 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"
}