Skip to content
Discussion options

You must be logged in to vote

@jmas you're exactly right, you just need to alias your server-only code. Here are the docs that describe this in detail: https://payloadcms.com/docs/admin/webpack#aliasing-server-only-modules and here's a real-world example of this: https://github.com/payloadcms/template-ecommerce/blob/main/src/payload.config.ts#L35. Would this work for you?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jacobsfletch
Comment options

@jmas
Comment options

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