[static-build] Add support for Build Output v3 detection (#7669)

Adds detection logic for a framework / build script outputting Build Output v3
format to the filesystem. In this case, `static-build` will simply stop processing
after the Build Command since deserialization happens in the build-container side
of things (this is different compared to the v1 output which gets handled in this
Builder. The reason for that is because the v3 output matches what `vc build`
outputs vs. v1 which is a different format).
This commit is contained in:
Nathan Rajlich
2022-04-12 09:09:50 -07:00
committed by GitHub
parent d62461d952
commit 58f479c603
13 changed files with 219 additions and 21 deletions

View File

@@ -0,0 +1,7 @@
const fs = require('fs');
fs.mkdirSync('.vercel/output/static', { recursive: true });
fs.writeFileSync('.vercel/output/config.json', '{}');
fs.writeFileSync(
'.vercel/output/static/index.html',
'<h1>Build Output API</h1>'
);

View File

@@ -0,0 +1,7 @@
{
"name": "09-build-output-v3",
"private": true,
"scripts": {
"build": "node build.js"
}
}