@@ -79,12 +79,14 @@ exports.getEntryModule = function (appDirectory, platform) {
7979 const entry = getPackageJsonEntry ( appDirectory ) ;
8080
8181 const tsEntryPath = path . resolve ( appDirectory , `${ entry } .ts` ) ;
82+ const ktEntryPath = path . resolve ( appDirectory , `${ entry } .kt` ) ;
8283 const jsEntryPath = path . resolve ( appDirectory , `${ entry } .js` ) ;
83- let entryExists = existsSync ( tsEntryPath ) || existsSync ( jsEntryPath ) ;
84+ let entryExists = existsSync ( tsEntryPath ) || existsSync ( ktEntryPath ) || existsSync ( jsEntryPath ) ;
8485 if ( ! entryExists && platform ) {
8586 const platformTsEntryPath = path . resolve ( appDirectory , `${ entry } .${ platform } .ts` ) ;
87+ const platformKtEntryPath = path . resolve ( appDirectory , `${ entry } .${ platform } .kt` ) ;
8688 const platformJsEntryPath = path . resolve ( appDirectory , `${ entry } .${ platform } .js` ) ;
87- entryExists = existsSync ( platformTsEntryPath ) || existsSync ( platformJsEntryPath ) ;
89+ entryExists = existsSync ( platformTsEntryPath ) || existsSync ( platformKtEntryPath ) || existsSync ( platformJsEntryPath ) ;
8890 }
8991
9092 if ( ! entryExists ) {
@@ -208,7 +210,7 @@ function getPackageJsonEntry(appDirectory) {
208210 throw new Error ( `${ appDirectory } /package.json must contain a 'main' attribute!` ) ;
209211 }
210212
211- return entry . replace ( / \. j s $ / i, "" ) ;
213+ return entry . replace ( / \. j s $ / i, "" ) . replace ( / \. k t $ / i , "" ) ;
212214}
213215
214216function verifyEntryModuleDirectory ( appDirectory ) {
0 commit comments