contember client vercel deploy #759
|
Hi, is there a best practice for deploying a Contember-based monorepo on Vercel? I’m deploying a Next.js project from a Contember monorepo on Vercel. The project uses shared internal packages – for example, I’m trying to import a queryBuilder function from @app/client. I’ve set /website as the project root on Vercel. In website/package.json, I’ve included the required dependencies: However, when I try to deploy, the build fails with the following error: ../client/src/content/index.ts Any idea what I might be missing? Is there a recommended way to import internal packages that have their own dependencies, when deploying from a subdirectory like /website? Thanks a lot for any tips or guidance! |
Replies: 1 comment 1 reply
|
This isn't directly related to Contember itself, but rather to how Vercel handles monorepos. To configure Vercel's build and deployment settings, you can use the following:
This setup tells Vercel where to find the build output in a monorepo structure—but keep in mind, it will still install the entire monorepo. Important This is a naive setup. For a more robust and efficient solution, be sure to check the official docs: https://vercel.com/docs/monorepos |
This isn't directly related to Contember itself, but rather to how Vercel handles monorepos. To configure Vercel's build and deployment settings, you can use the following:
yarn run build-websitewebsite/.next/This setup tells Vercel where to find the build output in a monorepo structure—but keep in mind, it will still install the entire monorepo.
Important
This is a naive setup. For a more robust and efficient solution, be sure to check the official docs: https://vercel.com/docs/monorepos