mirror of
https://github.com/payloadcms/payload.git
synced 2026-09-14 20:07:19 +08:00
47b8d83d1b
## 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.
5.1 KiB
5.1 KiB