Skip to content

Commit 711ab32

Browse files
committed
docs: Add a note about pnpm@10 installation
1 parent 25d83b6 commit 711ab32

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,34 @@ npm install @morev/vue-transitions
7878
pnpm add @morev/vue-transitions
7979
```
8080

81+
**Important note for `pnpm>=10.0.0` users**
82+
83+
The package relies on `postinstall` hook to determine the Vue version and provide proper components. \
84+
By default, [[email protected] does not execute lifecycle hooks](https://github.com/pnpm/pnpm/releases/tag/v10.0.0),
85+
so to make it work you need to add the package to the [`pnpm.onlyBuiltDependencies`](https://pnpm.io/package_json#pnpmonlybuiltdependencies)
86+
field in your `package.json` before installing:
87+
88+
```json
89+
{
90+
"pnpm": {
91+
"onlyBuiltDependencies": ["@morev/vue-transitions"]
92+
}
93+
}
94+
```
95+
96+
If you install the package before adding the entry, you have to set Vue version you are using manually using the command
97+
`vue-transitions-version-switch`:
98+
99+
```sh
100+
# set Vue 3
101+
pnpm vue-transitions-version-switch 3
102+
103+
# Set Vue 2
104+
pnpm vue-transitions-version-switch 2
105+
```
106+
107+
*Even with the command launched, it's important to add the `pnpm.onlyBuiltDependencies` field so that everything works well in future installations.*
108+
81109
---
82110

83111
### Using `bun`

0 commit comments

Comments
 (0)