Files
payloadcms__payload/tsconfig.base.json
German Jablonski 47b8d83d1b chore: resolve local @payloadcms/figma from the figma monorepo (#17594)
## Why

The dev-only alias for `@payloadcms/figma` points at
`../enterprise-plugins/packages/figma`, where the adapter used to live.
It has since moved into the figma monorepo, so on a current checkout
that path does not resolve, `hasFigma` is false, and the alias quietly
falls back to `node_modules`. Local edits to the adapter are then
ignored by tests, which is the opposite of what the alias exists for.

## What

- Point the alias at the new location.
- Add `PAYLOAD_FIGMA_PLUGIN_PATH` to override it. A relative path can
only ever name one checkout, so the env var covers a clone under a
different directory name, or several worktrees where you want to choose
which one a run resolves against.

## Test plan

With the monorepo checked out next to this repo and nothing configured:

```
pnpm exec vitest list test/access-control/int.spec.ts
[Dev Setup] Using local @payloadcms/figma source
```

Setting `PAYLOAD_FIGMA_PLUGIN_PATH` makes the log show that path
instead. A checkout where neither path exists is unaffected: `hasFigma`
stays false and the alias is not applied.
2026-07-31 15:12:53 -04:00

5.1 KiB