# Org.jetbrains.kotlin.js vs kotlin2js

**URL:** <https://discuss.kotlinlang.org/t/org-jetbrains-kotlin-js-vs-kotlin2js/14262>\
**Category:** JavaScript\
**Created:** [September 14, 2019, 9:58am UTC](https://discuss.kotlinlang.org/t/org-jetbrains-kotlin-js-vs-kotlin2js/14262 "2019-09-14T09:58:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morons](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Morons](https://discuss.kotlinlang.org/u/Morons)\
**Post date:** [September 14, 2019, 9:58am UTC](https://discuss.kotlinlang.org/t/org-jetbrains-kotlin-js-vs-kotlin2js/14262/1 "2019-09-14T09:58:37Z")

</div>

I am pretty new to JS and found some conflicting libraries to use  
**Creating a new IJ project with kotlin/JS**  
Gradle has  
plugins { id ‘org.jetbrains.kotlin.js’ }  
dependencies {  
implementation “ch.qos.logback:logback-classic:$logback\_version”  
implementation “org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin\_version”  
testImplementation “org.jetbrains.kotlin:kotlin-test-js”  
}

**However the official support demonstrates a (I guess a outdated Sample?)**  
apply plugin: ‘kotlin2js’  
dependencies { compile “org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin\_version” }

compileKotlin2Js.kotlinOptions.sourceMap = true  
compileKotlin2Js.kotlinOptions.outputFile = “${projectDir}/web/js/app.js”  
compileKotlin2Js.kotlinOptions.suppressWarnings = true  
compileKotlin2Js.kotlinOptions.verbose = true

I could not find documentation to set the Options using the org.jetbrains.kotlin.js _(witch seem to be a newer incarnation of the kotlin2js library)_

I am trying to use teach myself by using samples like [KotlinFullstackSample](https://github.com/alphamu/KotlinFullstackSample)  
Is there a Sample project I can use to educate myself? as my sample is also old!

---

<div class="post-metadata">

**Author:** ![apl](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@apl](https://discuss.kotlinlang.org/u/apl)\
**Post date:** [October 12, 2019, 10:10am UTC](https://discuss.kotlinlang.org/t/org-jetbrains-kotlin-js-vs-kotlin2js/14262/2 "2019-10-12T10:10:53Z")

</div>

I have the same problem. There is no documentation for the new kotlin.js plugin. Why do new projects in IntelliJ use the new plugin when it isn’t documented? It’s just making life harder.

---

<div class="post-metadata">

**Author:** ![lamba92](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/lamba92/32/5089_2.png) [@lamba92](https://discuss.kotlinlang.org/u/lamba92)\
**Post date:** [October 12, 2019, 10:40am UTC](https://discuss.kotlinlang.org/t/org-jetbrains-kotlin-js-vs-kotlin2js/14262/3 "2019-10-12T10:40:07Z")

</div>

The Kotlin team is trying to unify names of their Kotlin tools, phasing everything to `org.jetbrains.kotlin.${PLUGIN_NAME}`. Many plugins have been merged into others or have changed name to come to a common standard:

- `kotlin2js` – (renamed) → `org.jetbrains.kotlin.js`
- `konan` – (renamed) → `org.jetbrains.kotlin.native`
- `kotlin-frontend-plugin` – (merged into) → `org.jetbrains.kotlin.js`
- `kotlin-android` – (renamed) → `org.jetbrains.kotlin.android`
- `kotlin-android-extensions` – (renamed) → `org.jetbrains.kotlin.android.extensions`

And many more that now slips my mind!

By personal experience use always the one with standardized name, and yes, the official documentation most of the time makes references to old names…
