Skip to content

Commit e3e0e58

Browse files
authored
fix!: remove Vue 2 support (#430)
1 parent 07a1200 commit e3e0e58

28 files changed

+1554
-5208
lines changed

README.md

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Access thousands of icons as components **on-demand** universally.
99
- 🌏 Universal
1010
- 🤹 **Any** icon sets - ~150 popular sets with over 200,000 icons, logos, emojis, etc. Powered by [Iconify](https://github.com/iconify/iconify).
1111
- 📦 **Major** build tools - Vite, Webpack, Rollup, Nuxt, Rspack, etc. Powered by [unplugin](https://github.com/unjs/unplugin).
12-
- 🚀 **Major** frameworks - Vanilla, Web Components, React, Vue 3, Vue 2, Solid, Svelte, and more. [Contribute](./src/core/compilers).
12+
- 🚀 **Major** frameworks - Vanilla, Web Components, React, Vue 3, Solid, Svelte, and more. [Contribute](./src/core/compilers).
1313
- 🍱 **Any** combinations of them!
1414
- ☁️ On-demand - Only bundle the icons you really use, while having all the options.
1515
- 🖨 SSR / SSG friendly - Ship the icons with your page, no more FOUC.
@@ -458,9 +458,9 @@ See [the Astro + Vue example](examples/astro-vue) for a working example project.
458458
###### Frameworks
459459

460460
<details>
461-
<summary>Vue 3 / Vue 2.7+</summary><br>
461+
<summary>Vue 3</summary><br>
462462

463-
Vue 3 / Vue 2.7+ support requires peer dependency `@vue/compiler-sfc`:
463+
Vue 3 support requires peer dependency `@vue/compiler-sfc`:
464464

465465
> Note that as of Vue 3.2.13+, this is no longer required as it is now included as a dependency of the main `vue` package.
466466

@@ -491,38 +491,6 @@ See [the Vue 3 example](examples/vite-vue3) for a working example project.
491491

492492
<br></details>
493493

494-
<details>
495-
<summary>Vue 2 (only for versions < 2.7)</summary><br>
496-
497-
Vue 2 support requires peer dependency `vue-template-compiler`:
498-
499-
```bash
500-
npm i -D vue-template-compiler
501-
```
502-
503-
```ts
504-
Icons({ compiler: 'vue2' })
505-
```
506-
507-
Type Declarations
508-
509-
<!-- eslint-skip -->
510-
511-
```jsonc
512-
// tsconfig.json
513-
{
514-
"compilerOptions": {
515-
"types": [
516-
"unplugin-icons/types/vue",
517-
]
518-
}
519-
}
520-
```
521-
522-
See [the Vue 2 example](examples/vite-vue2) for a working example project.
523-
524-
<br></details>
525-
526494
<details>
527495
<summary>React</summary><br>
528496

@@ -1107,15 +1075,15 @@ Icons({
11071075
scale: 1.2, // Scale of icons against 1em
11081076
defaultStyle: '', // Style apply to icons
11091077
defaultClass: '', // Class names apply to icons
1110-
compiler: null, // 'vue2', 'vue3', 'jsx'
1078+
compiler: null, // 'vue3', 'jsx'
11111079
jsx: 'react', // 'react' or 'preact'
11121080
})
11131081
```
11141082

11151083
## Auto Importing
11161084

11171085
<details>
1118-
<summary>Vue 2 & 3</summary><br>
1086+
<summary>Vue 3</summary><br>
11191087

11201088
Use with [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components)
11211089

examples/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
| `Solid (Vite)` | [GitHub](https://github.com/unplugin/unplugin-icons/tree/main/examples/vite-solid) | [Play Online](https://stackblitz.com/fork/github/unplugin/unplugin-icons/tree/main/examples/vite-solid) |
1616
| `Svelte (Vite)` | [GitHub](https://github.com/unplugin/unplugin-icons/tree/main/examples/vite-svelte) | [Play Online](https://stackblitz.com/fork/github/unplugin/unplugin-icons/tree/main/examples/vite-svelte) |
1717
| `VanillaJS (Vite)` | [GitHub](https://github.com/unplugin/unplugin-icons/tree/main/examples/vite-vanilla) | [Play Online](https://stackblitz.com/fork/github/unplugin/unplugin-icons/tree/main/examples/vite-vanilla) |
18-
| `Vue2 (Vite)` | [GitHub](https://github.com/unplugin/unplugin-icons/tree/main/examples/vite-vue2) | [Play Online](https://stackblitz.com/fork/github/unplugin/unplugin-icons/tree/main/examples/vite-vue2) |
1918
| `Vue3 (Vite)` | [GitHub](https://github.com/unplugin/unplugin-icons/tree/main/examples/vite-vue3) | [Play Online](https://stackblitz.com/fork/github/unplugin/unplugin-icons/tree/main/examples/vite-vue3) |
2019
| `Vue3 legacy (Vite)` | [GitHub](https://github.com/unplugin/unplugin-icons/tree/main/examples/vite-vue3-legacy) | [Play Online](https://stackblitz.com/fork/github/unplugin/unplugin-icons/tree/main/examples/vite-vue3-legacy) |
2120
| `Web Components (Vite)` | [GitHub](https://github.com/unplugin/unplugin-icons/tree/main/examples/vite-web-components) | [Play Online](https://stackblitz.com/fork/github/unplugin/unplugin-icons/tree/main/examples/vite-web-components) |
22-
| `Vue2 (Vue CLI)` | [GitHub](https://github.com/unplugin/unplugin-icons/tree/main/examples/vue-cli-vue2) | [Play Online](https://stackblitz.com/fork/github/unplugin/unplugin-icons/tree/main/examples/vue-cli-vue2) |

examples/vite-vue2/.stackblitz.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/vite-vue2/App.vue

Lines changed: 0 additions & 38 deletions
This file was deleted.

examples/vite-vue2/components.d.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/vite-vue2/index.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/vite-vue2/main.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/vite-vue2/package.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

examples/vite-vue2/vite.config.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/vite-vue2/vue-shim.d.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)