Skip to content

Commit 2df5c67

Browse files
committed
Fix the npm run build:ios and npm run build:android commands in TS projects
1 parent af8e1a3 commit 2df5c67

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

generator/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ const tslintSetup = (module.exports.tslintSetup = async (dirPathPrefix, tslintPa
721721
// setup tsconfig for native only projects
722722
const tsconfigSetup = (module.exports.tsconfigSetup = async (options, dirPathPrefix, nativeAppPathModifier) => {
723723
try {
724-
// 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
725725
let tsConfigContent = '';
726726
let tsConfigPath = path.join(dirPathPrefix, 'tsconfig.json');
727727

@@ -736,6 +736,9 @@ const tsconfigSetup = (module.exports.tsconfigSetup = async (options, dirPathPre
736736
tsConfigContent.compilerOptions.noImplicitAny = false;
737737
// // // tsConfigContent.compilerOptions.types = [];
738738

739+
// edit types attribute to fix build
740+
tsConfigContent.compilerOptions.types = ['node'];
741+
739742
// edit some of the options in compilerOptions.paths object array
740743
tsConfigContent.compilerOptions.paths['@/*'] = [nativeAppPathModifier + '*'];
741744
tsConfigContent.compilerOptions.paths['assets/*'] = [nativeAppPathModifier + 'assets/*'];

0 commit comments

Comments
 (0)