mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
a5a47b2a6e
### Why? When Proxy/Middleware had invalid exports (valid: named function `proxy` for `proxy.js`, named function `middleware` for `middleware.js`, or default function), it errored during runtime but not during build. This error can sneak into production as it only throws during runtime. ### How? Walk AST of the Proxy/Middleware file, and if a valid export is not found, throw during build. --------- Co-authored-by: Benjamin Woodruff <benjamin.woodruff@vercel.com>
7 lines
96 B
JavaScript
7 lines
96 B
JavaScript
/**
|
|
* @type {import('next').NextConfig}
|
|
*/
|
|
const nextConfig = {}
|
|
|
|
module.exports = nextConfig
|