@@ -266,11 +266,12 @@ module.exports = async (api, options, rootOptions) => {
266
266
await tsconfigSetup ( options , genConfig . dirPathPrefix , genConfig . nativeAppPathModifier ) ;
267
267
268
268
if ( fs . existsSync ( api . resolve ( 'tslint.json' ) ) ) {
269
+ await tslintSetup ( genConfig . dirPathPrefix , api . resolve ( 'tslint.json' ) , genConfig . tsExclusionArray ) ;
270
+
269
271
const baseDir = genConfig . nativeAppPathModifier ;
270
272
require ( '../lib/tslint' ) ( {
271
273
'_' : [ `${ baseDir } **/*.ts` , `${ baseDir } **/*.vue` , `${ baseDir } **/*.tsx` , 'tests/**/*.ts' , 'tests/**/*.tsx' ]
272
- } , api , true ) ;
273
- tslintSetup ( genConfig . dirPathPrefix , api . resolve ( 'tslint.json' ) , genConfig . tsExclusionArray ) ;
274
+ } , api , false ) ;
274
275
}
275
276
}
276
277
@@ -720,7 +721,7 @@ const tslintSetup = (module.exports.tslintSetup = async (dirPathPrefix, tslintPa
720
721
// setup tsconfig for native only projects
721
722
const tsconfigSetup = ( module . exports . tsconfigSetup = async ( options , dirPathPrefix , nativeAppPathModifier ) => {
722
723
try {
723
- // setup the abilty to edit the tsconfig.json file in the root of the project
724
+ // setup the ability to edit the tsconfig.json file in the root of the project
724
725
let tsConfigContent = '' ;
725
726
let tsConfigPath = path . join ( dirPathPrefix , 'tsconfig.json' ) ;
726
727
@@ -735,6 +736,9 @@ const tsconfigSetup = (module.exports.tsconfigSetup = async (options, dirPathPre
735
736
tsConfigContent . compilerOptions . noImplicitAny = false ;
736
737
// // // tsConfigContent.compilerOptions.types = [];
737
738
739
+ // edit types attribute to fix build
740
+ tsConfigContent . compilerOptions . types = [ 'node' ] ;
741
+
738
742
// edit some of the options in compilerOptions.paths object array
739
743
tsConfigContent . compilerOptions . paths [ '@/*' ] = [ nativeAppPathModifier + '*' ] ;
740
744
tsConfigContent . compilerOptions . paths [ 'assets/*' ] = [ nativeAppPathModifier + 'assets/*' ] ;
0 commit comments