fix: proxy api request

This commit is contained in:
Yidadaa 2023-05-04 22:18:03 +08:00
parent fce3b3ce7b
commit eec1dd6448
2 changed files with 7 additions and 2 deletions

View File

@ -15,8 +15,11 @@ declare global {
type DangerConfig = typeof DANGER_CONFIG; type DangerConfig = typeof DANGER_CONFIG;
} }
export async function POST() { async function handle() {
return NextResponse.json(DANGER_CONFIG); return NextResponse.json(DANGER_CONFIG);
} }
export const GET = handle;
export const POST = handle;
export const runtime = "edge"; export const runtime = "edge";

View File

@ -16,7 +16,9 @@ const nextConfig = {
}); });
} }
return ret; return {
afterFiles: ret,
};
}, },
webpack(config) { webpack(config) {
config.module.rules.push({ config.module.rules.push({