Skip to content

Commit 2da3253

Browse files
authored
fix(deps): make vuetify a peerDependency (support Vuetify 3 & 4) (#378)
* fix(deps): make vuetify a peerDependency to support v3 and v4 * docs: add vuetify peer-dependency install step (#330, #378)
1 parent 806a1e7 commit 2da3253

4 files changed

Lines changed: 35 additions & 7 deletions

File tree

docs/guide/index.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,29 @@ You can also try it online on StackBlitz:
4040

4141
### Existing Project
4242

43-
If you already have a Nuxt project, you can add the module using `nuxt`:
43+
If you already have a Nuxt project, first install `vuetify` — it is a peer dependency, so you choose the major version (Vuetify 3 or 4):
44+
45+
::: code-group
46+
47+
```bash [npm]
48+
npm install -D vuetify
49+
```
50+
51+
```bash [yarn]
52+
yarn add -D vuetify
53+
```
54+
55+
```bash [pnpm]
56+
pnpm add -D vuetify
57+
```
58+
59+
```bash [bun]
60+
bun add -D vuetify
61+
```
62+
63+
:::
64+
65+
Then add the module using `nuxt`:
4466

4567
::: code-group
4668

packages/vuetify-nuxt-module/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151

5252
> Requires Vite, will not work with Webpack
5353
54+
`vuetify` is a peer dependency (Vuetify 3 or 4) — install it alongside the module:
55+
5456
```bash
57+
npm install -D vuetify
5558
npx nuxt module add vuetify-nuxt-module
5659
```
5760

packages/vuetify-nuxt-module/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@
8686
"perfect-debounce": "catalog:",
8787
"semver": "catalog:",
8888
"ufo": "catalog:",
89-
"unconfig": "catalog:",
90-
"vuetify": "catalog:"
89+
"unconfig": "catalog:"
90+
},
91+
"peerDependencies": {
92+
"vuetify": "^3.4.0 || ^4.0.0"
9193
},
9294
"devDependencies": {
9395
"@antfu/eslint-config": "catalog:",
@@ -119,7 +121,8 @@
119121
"typescript": "catalog:",
120122
"vite": "catalog:",
121123
"vitest": "catalog:",
122-
"vue-tsc": "catalog:"
124+
"vue-tsc": "catalog:",
125+
"vuetify": "catalog:"
123126
},
124127
"build": {
125128
"externals": [

pnpm-lock.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)