xinlei3166 / vuepress-plugin-demoblock-plus

一个基于 Vuepress 2.x 的插件,它可以帮助你在编写文档的时候增加 Vue 示例。
https://xinlei3166.github.io/vuepress-demo/
MIT License
29 stars 12 forks source link

vuepress-webpack@2.0.0-beta.49版本下示例没有渲染 #11

Closed wjx19931104 closed 1 year ago

wjx19931104 commented 2 years ago

vuepress-webpack@2.0.0-beta.48版本正常 image 控制台无报错等信息

cgx452306705 commented 2 years ago

我也遇到这个问题了

cloud-prg commented 2 years ago

我也遇到这个问题了,

wuyifan0203 commented 2 years ago

俺也一样

image

"vuepress": "^2.0.0-beta.49", "vuepress-plugin-demoblock-plus": "^1.6.0"

引入方式

const demoblockPlugin = require('vuepress-plugin-demoblock-plus')
plugins: [
    registerComponentsPlugin({
      componentsDir: path.resolve(__dirname, './components'),
    }),
    demoblockPlugin({
      customClass: 'demoblock-custom',
      // theme: 'github-light',
      cssPreprocessor: 'less',
      scriptReplaces: [
        { searchValue: /const ({ defineComponent as _defineComponent }) = Vue/g,
          replaceValue: 'const { defineComponent: _defineComponent } = Vue'
        }
      ]
    })
  ],

试例仓库 https://github.com/wuyifan0203/vuepress-interview.git dev分支

xinlei3166 commented 2 years ago

不支持最新版,是由于vuepress-next作者更新了底层的markdown支持。

v2正在使用TypeScript重新开发中,支持最新版,近期发布。

xinlei3166 commented 1 year ago

v2版本已发布