fix(build): resolve Next.js build failures from invalid route exports
- Extract detectAuthAnomalies + THRESHOLDS from route.ts to detect.ts (Next.js rejects non-standard exports from route files) - Add explicit RenderResult return type to test-utils customRender - Skip ESLint during next build (runs separately via pnpm lint) - Revert test file exclusions from tsconfig (breaks eslint parser) - Update route.test.ts imports to match new file structure Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,11 @@ const nextConfig: NextConfig = {
|
||||
"@capakraken/staffing",
|
||||
],
|
||||
typedRoutes: true,
|
||||
eslint: {
|
||||
// ESLint runs separately via `pnpm lint` — skip during `next build` to
|
||||
// avoid plugin resolution issues in the build environment.
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
async redirects() {
|
||||
return [
|
||||
// Common URL alias — redirect to the real auth entry point
|
||||
@@ -86,6 +91,7 @@ const nextConfig: NextConfig = {
|
||||
let exportedConfig: NextConfig = nextConfig;
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
try {
|
||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||
const { withSentryConfig } = require("@sentry/nextjs");
|
||||
exportedConfig = withSentryConfig(nextConfig, {
|
||||
silent: true,
|
||||
|
||||
Reference in New Issue
Block a user