Next.js Discord

Discord Forum

How to Bundle Additional Packages in a Vercel Serverless Function

American black bear posted this in #help-forum
Open in Discord
American black bearOP
Hello everyone,

I'm working on a project where I'm using ImageMagick in a next.js 13 serverless function. I am running into an issue where I need to bundle the package ImageMagick with my serverless function.

I did a workaround and added the ImageMagcik binaries directly to the project but I need also shared libraries in order to make it work.

I'd like to know how to properly install and bundle this package so that it's available to the serverless function. Any help would be greatly appreciated.

Thank you!

0 Replies