Capítulo 422 de 456
Configures how Next.js handles TypeScript errors and which tsconfig file to use during production builds.
ignoreBuildErrors (default false): lets next build succeed even with TypeScript errors present; completely skips the type-checking step (does not just suppress output).tsconfigPath (default 'tsconfig.json'): points to a custom TS config file for builds/tooling.module.exports = {
typescript: {
ignoreBuildErrors: false,
tsconfigPath: 'tsconfig.json',
},
}
| Option | Type | Default | Description |
|---|---|---|---|
ignoreBuildErrors | boolean | false | Allow production builds to complete even with TypeScript errors. |
tsconfigPath | string | 'tsconfig.json' | Path to a custom tsconfig.json file. |
ignoreBuildErrors: true sem checar tipos em outro lugar do pipeline: build passa "perigosamente" mesmo com erros reais de tipo; é preciso rodar tsc --noEmit (ou equivalente) no CI/deploy.ignoreBuildErrors bypassa o type-check inteiro, não apenas os erros mostrados.tsconfigPath pra apontar builds/tooling a um tsconfig diferente do usado pelo editor.