Skip to content

Commit

Permalink
chore: add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hardfist committed Jan 6, 2025
1 parent faf91ce commit 54abf58
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions website/docs/en/config/resolve.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,10 @@ When enabled, symlinked resources are resolved to their real path, not their sym
- **Type:** `Record<string, Resolve>`.

Customize the Resolve configuration based on the module type.

## resolve.enablePnp

- **Type:** `boolean`
- **Default:** `!!process.versions.pnp`

When enabled, it will enable [Yarn PnP](https://yarnpkg.com/features/pnp) resolution, It's enabled by default when [`!!process.versions.pnp`](https://yarnpkg.com/advanced/pnpapi#processversionspnp) is true which means running in Yarn PnP environments.
7 changes: 7 additions & 0 deletions website/docs/zh/config/resolve.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,10 @@ module.exports = {
- **类型:** `Record<string, Resolve>`.

依据模块类型自定义 Resolve 配置。

## resolve.enablePnp

- **类型:** `boolean`
- **默认值:** `!!process.versions.pnp`

启用时,将使用 [Yarn PnP](https://yarnpkg.com/features/pnp) 算法进行路径解析,当 [`!!process.versions.pnp`](https://yarnpkg.com/advanced/pnpapi#processversionspnp) 为 true 时,即在 Yarn PnP 环境中运行时,它默认是启用的。

0 comments on commit 54abf58

Please sign in to comment.