diff --git a/atomicfu-js/build.gradle b/atomicfu-js/build.gradle index e90defe6..122a0609 100644 --- a/atomicfu-js/build.gradle +++ b/atomicfu-js/build.gradle @@ -21,9 +21,8 @@ tasks.withType(compileKotlin2Js.getClass()) { compileKotlin2Js { kotlinOptions { - // drop -js suffix from main outputFile, but don't do it for tests - // see https://youtrack.jetbrains.com/issue/KT-23582 - def baseName = project.name - "-js" + // NOTE: Module base-name must be equal to the package name declared in package.json + def baseName = "kotlinx-atomicfu" outputFile = new File(outputFile.parent, baseName + ".js") } } diff --git a/atomicfu-js/npm/package.json b/atomicfu-js/npm/package.json index 494d7a4b..1fbba65f 100644 --- a/atomicfu-js/npm/package.json +++ b/atomicfu-js/npm/package.json @@ -2,7 +2,7 @@ "name": "kotlinx-atomicfu", "version" : "$version", "description" : "AtomicFU utilities for JS", - "main" : "atomicfu.js", + "main" : "kotlinx-atomicfu.js", "author": "JetBrains", "license": "Apache-2.0", "homepage": "https://github.com/Kotlin/atomicfu",