Skip to content

怎么添加插件呢。为什么我这样添加插件会报错 #1577

Closed Answered by Mister-Hope
zhanshenxiaomao asked this question in Q&A
Discussion options

You must be logged in to vote

请自己学习js,这不是我们的工作

import { defaultTheme } from '@vuepress/theme-default'
import { defineUserConfig } from 'vuepress/cli'
import { viteBundler } from '@vuepress/bundler-vite'
import { searchPlugin } from '@vuepress/plugin-search'

export default defineUserConfig({
  lang: 'en-US',

  title: 'VuePress',
  description: 'My first VuePress Site',

  theme: defaultTheme({
    logo: 'https://git-scm.com/images/logos/downloads/Git-Icon-1788C.svg',
    colorModeSwitch: '',
    colorMode: 'dark',

    navbar: ['/', '/get-started'],
  }),

  bundler: viteBundler(),

  plugins: [
    searchPlugin({
      // 配置项
    })
  ],
})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Mister-Hope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants