vuepress icon indicating copy to clipboard operation
vuepress copied to clipboard

TypeError: defaultTheme is not a function

Open codepandy opened this issue 3 years ago • 1 comments

I want to config the sidebar, when I import the default theme as the demo, there is a error.

const {defaultTheme} = require("@vuepress/theme-default");
module.exports = {
  lang: "zh-CN",
  title: "博客",
  description: "",
  base: "/",
  theme: defaultTheme({
    // 侧边栏
    sidebar: [{ text: "Foo", link: "/guide/" }],
  }),
};


codepandy avatar Jun 15 '22 10:06 codepandy

This is v1 repo, please ensure you are using the correct version and reading that docs.

Mister-Hope avatar Jun 18 '22 07:06 Mister-Hope