Skip to content

How to properly apply patches to Keystone 6? #9383

Answered by marekryb
Meetcpatel asked this question in Questions
Discussion options

You must be logged in to vote

When you are importing @keystone-6/auth you are actually importing from @keystone-6/auth/dist - javascript files being output of transpilation from typescript. So changing source files will change nothing (unless you import from /src/ directly, but I doubt it will work).

To use patch-package you would need to:

  1. clone keystone repo to your machine
  2. make your change
  3. build it (pnpm build)
  4. copy relevant (.cjs.dev.js / .cjs.prod.js / .esm.js) files to your node_modules and then run patch-package.
    (For SigninPage the relevant dir is @keystone-6/auth/pages/SigninPage/dist/)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Meetcpatel
Comment options

Answer selected by Meetcpatel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants