cloudacy / vue-markdown-render

A simple markdown parser for Vue using markdown-it.
MIT License
79 stars 10 forks source link

got error with vue2 #12

Closed timestee closed 9 months ago

timestee commented 1 year ago
instrument.js:108 

       TypeError: Object(...) is not a function
    at ./node_modules/vue-markdown-render/dist/VueMarkdown.js (VueMarkdown.js:3:1)
    at __webpack_require__ (bootstrap:766:1)
    at fn (bootstrap:129:1)
    at ./node_modules/cache-loader/dist/cjs.js?!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/chatgpt/index.vue?vue&type=script&lang=js& (index.vue?6fbd:18:1)
    at __webpack_require__ (bootstrap:766:1)
Lizwis commented 10 months ago

you don't need markdown parser in vue, just v-html

p-kuen commented 9 months ago

This plugin is only compatible with vue >= 3, as you can see in the peerDependencies. You may try version 1.1.3 of this plugin, which was based on vue 2.