MellowCo / unocss-preset-weapp

unocss preset for wechat miniprogram,unocss小程序预设,在 taro uniapp 原生小程序 中使用unocss
https://playful-gumption-4bb42b.netlify.app
MIT License
365 stars 34 forks source link

unplugin-transform-class的package.json中exports没有导出相关的类型文件 #150

Closed yplxc closed 1 month ago

yplxc commented 1 month ago

没有导出类型文件,引入是ts报找不到模块,不知道作者能否导出呢

MellowCo commented 1 month ago

unplugin 是 default 导出的

https://github.com/MellowCo/unplugin-transform-class#installation

image

image

image

yplxc commented 1 month ago

感谢作者,我是用 pnpm 安装的,但是却一直报 无法找到模块“unplugin-transform-class/vite”的声明文件。“D:/study/uniapp-vite-ts-vue3/node_modules/.pnpm/unplugin-transform-class@0.5.3_rollup@4.19.0/node_modules/unplugin-transform-class/dist/vite.mjs”隐式拥有 "any" 类型。 There are types at 'd:/study/uniapp-vite-ts-vue3/node_modules/unplugin-transform-class/dist/vite.d.ts', but this result could not be resolved when respecting package.json "exports". The 'unplugin-transform-class' library may need to update its package.json or typings 1721872329853

MellowCo commented 1 month ago

删除node_module 重装吧,这个应该是你的环境问题

yplxc commented 1 month ago

删除node_module 重装吧,这个应该是你的环境问题

感谢解答