使用的组件为 Github 上 vue 的 markdown 组件:
https://github.com/zhaoxuhui1122/vue-markdown
vue报错:
【* !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-d467526a","scoped":false,"hasInlineConfig":false}!less-loader?{"sourceMap":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./index.vue in ./src/markdown/index.vue】
解决方案:
在尝试了网上说的一些更改路径的操作之后,发现错误并未消失。在index.vue中<style>标签中加入了【lang="less"】语句之后发现报错从一条增加到了两条,所以认为错误是由这一句话产生的。
所以查找了 npm 的 less 安装:
npm install less less-loader --save
重新运行,不报错,问题解决