跳至主要內容

Vite

小于 1 分钟

Vite

@vuepress/bundler-vite

Vite 打包工具是由 @vuepress/bundler-viteopen in new window 包提供的。它是 vuepressopen in new window 包的依赖之一,当然你也可以单独安装它:

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

配置项

Vite 打包工具的配置项:

import { viteBundler } from "@vuepress/bundler-vite";
import { defineUserConfig } from "@vuepress/cli";

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

viteOptions

vuePluginOptions