Skip to content

Is code in document need update? #13

Closed
@howtoesc

Description

@howtoesc

I use the demo code in document https://vuepress-theme-hope.github.io/v2/md-enhance/zh/guide/flowchart.html

// .vuepress/config.ts
import { mdEnhance } from "vuepress-plugin-md-enhance";

export default {
  plugins: [
    mdEnhance({
      // 开启标记
      mark: true,
    }),
  ],
};

then I got erro

~/sandbox/writing main ⇡1 +54 !44 ?22 ❯ yarn docs:build                                     4s
TypeError: (0 , import_vuepress_plugin_md_enhance.mdEnhance) is not a function
    at Object.<anonymous> (/home/howtoesc/sandbox/writing/vuepress.config.ts:78:53)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.require.extensions..ts (/home/howtoesc/sandbox/writing/node_modules/@vuepress/cli/lib/utils/allowTs.js:11:11)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at loadUserConfigEs (/home/howtoesc/sandbox/writing/node_modules/@vuepress/cli/lib/config/loadUserConfigEs.js:9:22)
    at loadUserConfig (/home/howtoesc/sandbox/writing/node_modules/@vuepress/cli/lib/config/loadUserConfig.js:16:20)
    at /home/howtoesc/sandbox/writing/node_modules/@vuepress/cli/lib/commands/build/createBuild.js:21:58

I notice that the demo code in home page is diffrent,these errors ware disappear when I changed follow it

// .vuepress/config.ts
import { mdEnhancePlugin } from "vuepress-plugin-md-enhance";

export default {
  plugins: [
    mdEnhancePlugin({
      // 你的选项
    }),
  ],
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions