in packages/kotlin-webpack-plugin/plugin.js [176:202]
async compileIfFirstRun(params, done) {
if (!this.initialRun) {
return done();
}
this.initialRun = false;
this.log.info('Initial compilation of Kotlin sources...');
try {
await this.compileKotlinSources();
if (!this.options.optimize) {
await Promise.all([
fs.remove(path.join(this.options.output, 'kotlin.js')),
this.copyLibraries(),
]);
}
await this.setPastDate();
} catch (e) {
this.generateErrorBundle(e.toString());
this.firstCompilationError = e;
} finally {
done();
}
}