server deps in browser build

default discord avatar
deekayqq
3 months ago
12

Hello and thanks for your work, Payload is GREAT!



I get some strange error. When we inside collection custom UI components and some nodejs libs like @hapi/iron used in custom routes or acces rules then this server-only deps bundled inside browser too and break front-end and console full of errors like Buffer is undefined... Maybe someone already encountered this type of errors and have a solution?

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.