File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/next/lib/typescript Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { getTypeScriptConfiguration } from './getTypeScriptConfiguration'
77import { getRequiredConfiguration } from './writeConfigurationDefaults'
88
99import { CompileError } from '../compile-error'
10+ import { warn } from '../../build/output/log'
1011
1112export interface TypeCheckResult {
1213 hasWarnings : boolean
@@ -40,19 +41,27 @@ export async function runTypeCheck(
4041 const options = {
4142 ...effectiveConfiguration . options ,
4243 ...requiredConfig ,
44+ declarationMap : false ,
45+ emitDeclarationOnly : false ,
4346 noEmit : true ,
4447 }
4548
4649 let program :
4750 | import ( 'typescript' ) . Program
4851 | import ( 'typescript' ) . BuilderProgram
4952 let incremental = false
50- if ( options . incremental && cacheDir ) {
53+ if ( ( options . incremental || options . composite ) && cacheDir ) {
54+ if ( options . composite ) {
55+ warn (
56+ 'TypeScript project references are not fully supported. Attempting to build in incremental mode.'
57+ )
58+ }
5159 incremental = true
5260 program = ts . createIncrementalProgram ( {
5361 rootNames : effectiveConfiguration . fileNames ,
5462 options : {
5563 ...options ,
64+ composite : false ,
5665 incremental : true ,
5766 tsBuildInfoFile : path . join ( cacheDir , '.tsbuildinfo' ) ,
5867 } ,
You can’t perform that action at this time.
0 commit comments