nei1ee / starter-uni

An UniApp Starter Template With Vue3, Vite, @unocss, @ano-ui.
https://starter-uni.vercel.app
MIT License
33 stars 2 forks source link

使用Ano.css 报错 #11

Closed Ena-Heleneto closed 1 year ago

Ena-Heleneto commented 1 year ago
uni-app 有新版本发布,请执行 `npx @dcloudio/uvm alpha` 更新,更新日志详见:https://download1.dcloud.net.cn/hbuilderx/changelog/3.8.11.20230719-alpha.html
​[unocss]​ ​failed to load icon "tabler-home"​
​[unocss]​ ​failed to load icon "tabler-compass"​
​[unocss]​ ​failed to load icon "tabler-user"​
[vite]: Rollup failed to resolve import "ano-ui/components/ATabBar/ATabBar.vue" from "D:/WorkSpace/Private-Abernethy/HW_maintenance_app/src/pages/index.vue?vue&type=script&setup=true&lang.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`

系统 : 微信开发工具

nei1ee commented 1 year ago

需要安装tabler图标

Ena-Heleneto commented 1 year ago

我安装了@iconify/json依赖 但是控制台还是报错

[vite]: Rollup failed to resolve import "ano-ui/components/ATabBar/ATabBar.vue" from "D:/WorkSpace/Private-Abernethy/HW_maintenance_app/src/pages/index.vue?vue&type=script&setup=true&lang.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`

之后我在vite config 里面配置了一下

  build: { rollupOptions: { external: [/ano-ui/] } },

控制台不报错了,但是项目中无法使用组件

image

nei1ee commented 1 year ago

Ano UI 组件版本是最新的吗?另外推荐使用 vitesse-uni-app 模版。

Ena-Heleneto commented 1 year ago

I understand,thank you