Skip to content

Commit aefa2ae

Browse files
authored
feat: add ionic framework resolver (#519)
1 parent 6b25075 commit aefa2ae

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ Supported Resolvers:
194194
- [Headless UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/headless-ui.ts)
195195
- [IDux](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/idux.ts)
196196
- [Inkline](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/inkline.ts)
197+
- [Ionic](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/ionic.ts)
197198
- [Naive UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/naive-ui.ts)
198199
- [Prime Vue](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/prime-vue.ts)
199200
- [Quasar](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/quasar.ts)

src/core/resolvers/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ export * from './arco'
1919
export * from './tdesign'
2020
export * from './layui-vue'
2121
export * from './bootstrap-vue'
22+
export * from './ionic'

src/core/resolvers/ionic.ts

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import type { ComponentResolver } from '../../types'
2+
3+
/**
4+
* Resolver for ionic framework
5+
*
6+
* @author @mathsgod
7+
* @link https://github.com/mathsgod
8+
*/
9+
export function IonicResolver(): ComponentResolver {
10+
return {
11+
type: 'component',
12+
resolve: (name: string) => {
13+
if (name.startsWith('Ion')) {
14+
return {
15+
name,
16+
from: '@ionic/vue',
17+
}
18+
}
19+
},
20+
}
21+
}

0 commit comments

Comments
 (0)