跳至主要內容

Vite

小于 1 分钟

Vite

@vuepress/bundler-vite

Vite 打包工具是由 @vuepress/bundler-viteopen in new window 包提供的。

使用方法

安装打包工具:

npm i -D @vuepress/bundler-vite@next

在配置文件中指定打包工具:

import { viteBundler } from '@vuepress/bundler-vite'
import { defineUserConfig } from 'vuepress'

export default defineUserConfig({
  bundler: viteBundler({
    viteOptions: {},
    vuePluginOptions: {},
  }),
})

配置项

viteOptions

vuePluginOptions