@@ -3,14 +3,14 @@ import { join } from 'path';
3
3
import * as ts from 'typescript' ;
4
4
import { Input } from '../commands' ;
5
5
import { AssetsManager } from '../lib/compiler/assets-manager' ;
6
+ import { deleteOutDirIfEnabled } from '../lib/compiler/helpers/delete-out-dir' ;
6
7
import { getBuilder } from '../lib/compiler/helpers/get-builder' ;
7
8
import { getTscConfigPath } from '../lib/compiler/helpers/get-tsc-config.path' ;
8
9
import { getValueOrDefault } from '../lib/compiler/helpers/get-value-or-default' ;
9
10
import { getWebpackConfigPath } from '../lib/compiler/helpers/get-webpack-config-path' ;
10
11
import { TsConfigProvider } from '../lib/compiler/helpers/tsconfig-provider' ;
11
12
import { PluginsLoader } from '../lib/compiler/plugins/plugins-loader' ;
12
13
import { TypeScriptBinaryLoader } from '../lib/compiler/typescript-loader' ;
13
- import { deleteOutDirIfEnabled } from '../lib/compiler/helpers/delete-out-dir' ;
14
14
import {
15
15
Configuration ,
16
16
ConfigurationLoader ,
@@ -21,7 +21,7 @@ import {
21
21
defaultWebpackConfigFilename ,
22
22
} from '../lib/configuration/defaults' ;
23
23
import { FileSystemReader } from '../lib/readers' ;
24
- import { ERROR_PREFIX } from '../lib/ui' ;
24
+ import { ERROR_PREFIX , INFO_PREFIX } from '../lib/ui' ;
25
25
import { isModuleAvailable } from '../lib/utils/is-module-available' ;
26
26
import { AbstractAction } from './abstract.action' ;
27
27
import webpack = require( 'webpack' ) ;
@@ -109,6 +109,20 @@ export class BuildAction extends AbstractAction {
109
109
watchAssetsMode ,
110
110
) ;
111
111
112
+ const typeCheck = getValueOrDefault < boolean > (
113
+ configuration ,
114
+ 'compilerOptions.typeCheck' ,
115
+ appName ,
116
+ 'typeCheck' ,
117
+ commandOptions ,
118
+ ) ;
119
+ if ( typeCheck && builder . type !== 'swc' ) {
120
+ console . warn (
121
+ INFO_PREFIX +
122
+ ` "typeCheck" will not have any effect when "builder" is not "swc".` ,
123
+ ) ;
124
+ }
125
+
112
126
switch ( builder . type ) {
113
127
case 'tsc' :
114
128
return this . runTsc (
0 commit comments