We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用Vite2建的Vue3,Typescript项目里,开发时,可以正常使用 Vditor,一旦使用 yarn build打包项目,就会报错。
Vditor
yarn build
不过,在package.json里,删除vue-tsc --noEmit后,就可以打包了。
package.json
vue-tsc --noEmit
这是写的代码
<template> <div id="vditor"></div> </template> <script lang="ts" setup> import { onMounted } from "vue"; import Vditor from "vditor"; ref: vditor = null as null | Vditor; onMounted(() => { initVditor() }) const initVditor = () => { vditor = new Vditor("vditor", { height: 360, toolbarConfig: { pin: true, }, cache: { enable: false, }, after: () => { if (vditor) vditor.setValue('hello, Vditor + Vue!') } }); } </script> <style> @import url(vditor/dist/index.css); </style>
这是报错截图
The text was updated successfully, but these errors were encountered:
我瞎了,#1015的问题和我遇见的一样
Sorry, something went wrong.
这个ref 为啥我写直接报错,ref: vditor = null as null | Vditor;
No branches or pull requests
使用Vite2建的Vue3,Typescript项目里,开发时,可以正常使用
Vditor
,一旦使用yarn build
打包项目,就会报错。不过,在
package.json
里,删除vue-tsc --noEmit
后,就可以打包了。这是写的代码
这是报错截图
The text was updated successfully, but these errors were encountered: