Skip to content

Commit 273a96d

Browse files
committed
docs: note added support in nuxt 4
1 parent 10ec95f commit 273a96d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ npm i nuxt-module-utils
1818

1919
### `hoistDependencies(hoist: string[])`
2020

21+
> [!NOTE]
22+
> [Nuxt `4.0.0+` now supports modules adding to `typescript.hoist`](https://github.com/nuxt/nuxt/pull/32601), this utility is only needed to support projects using Nuxt `3.x` with `compatibilityVersion: 4`.
23+
2124
While Nuxt provides the `typescript.hoist` option to generate aliases for nested dependencies within pnpm monorepos, it is processed before modules are set up.
2225

2326
The `hoistDependencies` utility allows you to hoist dependencies from within your module's `setup` function. It works by resolving the paths of the specified packages and adding them to Nuxt's TypeScript configuration, ensuring they are included in the generated `tsconfig.json`.

0 commit comments

Comments
 (0)