Dear All,
after some time I wanted to work on Payload's core:
So I cloned Payload's monorepo to ./libs in our own monorepo. First issue: as our "parent" monorepo is yarn4 controlled, pnpm won't run (Usage Error: This project is configured to use pnpm).
Adding "packageManager": "pnpm@8.15.4",
in package.json fixed that.
But now I can't find any docs regarding the dev setup. If I run pnpm build and point payload in our package.json to the local path, it will try to load ts-files (because payload's package.json exports src/*.ts instead of dist).
I don't get where the transformation (exporting js instead of ts) happens during the release process.. can you help?
Argh, sorry, I overlooked publishConfig 🫣
Hi @chris-schra,
First of all, welcome and thank you for wanting to contribute!
You're right that we did switch to pnpm from yarn so that bit of cleanup is needed.
As for running Payload to dev against it. You will be able to run pnpm dev fields
and that will start the payload from the test/fields/config.ts configuration. I said fields because that is a good one for working on the tabs condition property you mentioned.
We have a contributing.md for also for your reference. Let us know if you need anything else.
Thanks!
Thanks @DanRibbens
I wonder how I can create a local payload package so I can link our repo to it.
I know that might sound confused, so let me rephrase a question: when / how are the exports in Payload‘s packages/payload package.json transformed (from .ts to .js)?
Say I currently have a monorepo:
/Projects/AwesomeSite/packages/frontend
/Projects/AwesomeSite/packages/backend
Backend is using Payload. Currently the one from NPM
to make my modifications, I cloned this repo to
/Projects/AwesomeSite/libs/payload
When I now try to use
libs/payload/packages/payload in my repo it fails - because payload exports *.ts instead of *.js
Argh, sorry, I overlooked publishConfig 🫣
Star
Discord
online
Get dedicated engineering support directly from the Payload team.