sangtian152 / vue3-tree-org

基于vue3.x + typeScript 实现的组织架构图
MIT License
127 stars 17 forks source link

vue3+vite + ts 打包报错 #9

Closed see-the-day closed 1 year ago

see-the-day commented 1 year ago

Cannot find module '../../../utils/types' or its corresponding type declarations.

sangtian152 commented 1 year ago

同vue3+vite + ts,vue3-element-admin没有报错

see-the-day commented 1 year ago

image 这个文件我看在modules里面是没有的,但是没看懂你那个项目为什么不报错,用vite新搭一个引入应该是报错的

see-the-day commented 1 year ago

ts.config.json代码改成这个 { "compilerOptions": { "composite": true, "target": "esnext", "useDefineForClassFields": true, "module": "esnext", "moduleResolution": "node", "strict": true, "jsx": "preserve", "sourceMap": true, "resolveJsonModule": true, "esModuleInterop": true, "suppressImplicitAnyIndexErrors": true, "lib": ["esnext", "dom"], "paths": { "@/*": ["./src/*"] } }, } build 命令用 vue-tsc --noEmit && vite build 打包就会报错 json文件里面用references引用的话不会报错