https://github.com/mattphillips/vercel-mono
https://github.com/mattphillips/vercel-mono
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mattphillips/vercel-mono
- Owner: mattphillips
- Created: 2020-08-31T12:26:13.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-31T14:01:38.000Z (almost 5 years ago)
- Last Synced: 2025-01-29T09:45:01.562Z (5 months ago)
- Language: JavaScript
- Homepage: https://vercel-mono.vercel.app
- Size: 759 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vercel public directory deployment repro
This repro uses Yarn workspaces to provide a "monorepo" like project structure.
It has a Next.js app inside of the `/app` directory which has a dependency on the `/shared` project (package).
When deploying this to Vercel the project root is the Yarn workspace which is located at the root of the project (`./`).
This means a custom `output directory` needs to be specified in the Vercel settings. When setting it to `/app` a manifest not found error is thrown.
When setting it to `/app/.next` the app is successfully deployed but the static assets in the `app/public` folder are not deployed.
The only workaround I have been able to find for this is to copy both the `app/public` and `app/.next` directories up to the project root after building and leave the custom `output directory` in the Vercel settings as being empty. (See the `package` script in the root package.json).