Skip to content

Commit

Permalink
fix(vue)!: drop Vue 2 support (#439)
Browse files Browse the repository at this point in the history
* fix!: drop Vue 2 support

* chore: missed

* chore: useless test

* chore: sync lock

* chore: conflicts

* doc: update for Vue 2
  • Loading branch information
harlan-zw authored Jan 7, 2025
1 parent eb6ff33 commit 838a713
Show file tree
Hide file tree
Showing 53 changed files with 87 additions and 9,097 deletions.
26 changes: 24 additions & 2 deletions docs/content/1.setup/4.vue/0.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ navigation:
title: 'Installation'
---

## Introduction

Unhead is the official head management library for Vue. It provides a simple and intuitive API for managing the head of your application, including the title, meta tags, and other elements that are important for SEO and user experience.

## Setup

1. Install `@unhead/vue` dependency to your project:
Expand All @@ -25,14 +29,31 @@ pnpm add @unhead/vue

::

If you're using Vue 2, you will need to install v1 of `@unhead/vue` instead.

::code-group

```bash [yarn]
yarn add @unhead/vue@^1
```

```bash [npm]
npm install @unhead/vue@^1
```

```bash [pnpm]
pnpm add @unhead/vue@^1
```

::


### Demos

- [StackBlitz - Vite - Vue SPA](https://stackblitz.com/edit/vitejs-vite-uijgqa?file=package.json)

2. Register the Vue plugin:

::code-group

```ts [Vue 3]
import { createHead } from '@unhead/vue'
import { createApp } from 'vue'
Expand All @@ -46,6 +67,7 @@ app.mount('#app')
```

```ts [Vue 2]
// You must use v1 of Unhead for Vue 2 support
import { createHead } from '@unhead/vue'
import { UnheadPlugin } from '@unhead/vue/vue2'
import Vue from 'vue'
Expand Down
23 changes: 0 additions & 23 deletions examples/vue-2/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion examples/vue-2/.npmrc

This file was deleted.

19 changes: 0 additions & 19 deletions examples/vue-2/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions examples/vue-2/babel.config.js

This file was deleted.

19 changes: 0 additions & 19 deletions examples/vue-2/jsconfig.json

This file was deleted.

24 changes: 0 additions & 24 deletions examples/vue-2/package.json

This file was deleted.

Loading

0 comments on commit 838a713

Please sign in to comment.