mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-08 12:57:46 +00:00
This adds [Blitz.js](https://github.com/blitz-js/blitz) to the zero-config frameworks. Blitz compiles to a Next.js app, so it uses the same `@vercel/next` builder. The change in `packages/now-build-utils/src/detect-builders.ts` was made according to @styfle's suggestion in Slack. --- **This is a rerun of #4219 which had to be reverted because of this:** > It looks like the @vercel/next package still requires next in the dependencies. > > When I've deployed the example I've got only a file listing, but when I added next to the dependencies it worked. I'll revert for now. This new PR fixes that problem with a small refactor to `@vercel/next`. `@vercel/next` was getting the Next version two different ways: 1. By checking project root package.json for `next` in deps or devDeps 2. By trying to resolve the installed next version and get `version` from its package.json My refactor consolidates those two approaches by changing the existing `getNextVersion()` function to first try and resolve the real next version. If that fails, fall back to checking the project root. Blitz bundles Next, so the real next package version should always be resolved.