mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 04:22:12 +00:00
Revert "[static-build] Support subset of Build Output API v2" (#7803)
Revert "[static-build] Support subset of Build Output API v2 (#7690)"
This reverts commit 05243fb6e9.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
yarn.lock
|
||||
@@ -1,60 +0,0 @@
|
||||
const fs = require('fs');
|
||||
|
||||
fs.mkdirSync('.output/static', { recursive: true });
|
||||
fs.mkdirSync('.output/server/pages/api', { recursive: true });
|
||||
|
||||
fs.writeFileSync(
|
||||
'.output/functions-manifest.json',
|
||||
JSON.stringify(
|
||||
{
|
||||
version: 1,
|
||||
pages: {
|
||||
'_middleware.js': {
|
||||
runtime: 'web',
|
||||
env: [],
|
||||
files: ['server/pages/_middleware.js'],
|
||||
name: 'pages/_middleware',
|
||||
page: '/',
|
||||
regexp: '^/.*$',
|
||||
sortingIndex: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
null,
|
||||
2
|
||||
)
|
||||
);
|
||||
|
||||
fs.writeFileSync('.output/static/index.html', '<h1>Build Output API v2</h1>');
|
||||
|
||||
fs.writeFileSync('.output/server/pages/about.html', '<h1>Some Site</h1>');
|
||||
|
||||
fs.writeFileSync(
|
||||
'.output/server/pages/api/user.js',
|
||||
`export default function handler(request, response) {
|
||||
response.status(200).json({
|
||||
body: 'some user info'
|
||||
});
|
||||
}`
|
||||
);
|
||||
|
||||
fs.writeFileSync(
|
||||
'.output/server/pages/_middleware.js',
|
||||
`
|
||||
const getResult = (body, options) => ({
|
||||
promise: Promise.resolve(),
|
||||
waitUntil: Promise.resolve(),
|
||||
response: new Response(body, options),
|
||||
});
|
||||
|
||||
_ENTRIES = typeof _ENTRIES === 'undefined' ? {} : _ENTRIES;
|
||||
|
||||
_ENTRIES['middleware_pages/_middleware'] = {
|
||||
default: async function ({ request }) {
|
||||
|
||||
return getResult('hi from the edge', {});
|
||||
|
||||
},
|
||||
};
|
||||
`
|
||||
);
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "10-build-output-v2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "node build.js"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user