@@ -79,12 +79,14 @@ exports.getEntryModule = function (appDirectory, platform) {
79
79
const entry = getPackageJsonEntry ( appDirectory ) ;
80
80
81
81
const tsEntryPath = path . resolve ( appDirectory , `${ entry } .ts` ) ;
82
+ const ktEntryPath = path . resolve ( appDirectory , `${ entry } .kt` ) ;
82
83
const jsEntryPath = path . resolve ( appDirectory , `${ entry } .js` ) ;
83
- let entryExists = existsSync ( tsEntryPath ) || existsSync ( jsEntryPath ) ;
84
+ let entryExists = existsSync ( tsEntryPath ) || existsSync ( ktEntryPath ) || existsSync ( jsEntryPath ) ;
84
85
if ( ! entryExists && platform ) {
85
86
const platformTsEntryPath = path . resolve ( appDirectory , `${ entry } .${ platform } .ts` ) ;
87
+ const platformKtEntryPath = path . resolve ( appDirectory , `${ entry } .${ platform } .kt` ) ;
86
88
const platformJsEntryPath = path . resolve ( appDirectory , `${ entry } .${ platform } .js` ) ;
87
- entryExists = existsSync ( platformTsEntryPath ) || existsSync ( platformJsEntryPath ) ;
89
+ entryExists = existsSync ( platformTsEntryPath ) || existsSync ( platformKtEntryPath ) || existsSync ( platformJsEntryPath ) ;
88
90
}
89
91
90
92
if ( ! entryExists ) {
@@ -208,7 +210,7 @@ function getPackageJsonEntry(appDirectory) {
208
210
throw new Error ( `${ appDirectory } /package.json must contain a 'main' attribute!` ) ;
209
211
}
210
212
211
- return entry . replace ( / \. j s $ / i, "" ) ;
213
+ return entry . replace ( / \. j s $ / i, "" ) . replace ( / \. k t $ / i , "" ) ;
212
214
}
213
215
214
216
function verifyEntryModuleDirectory ( appDirectory ) {
0 commit comments