File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
core/src/main/kotlin/com/tschuchort/compiletesting Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package com.tschuchort.compiletesting
3
3
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
4
4
import org.jetbrains.kotlin.cli.js.K2JSCompiler
5
5
import java.io.*
6
+ import java.nio.file.Paths
7
+ import kotlin.io.path.nameWithoutExtension
6
8
7
9
@Suppress(" MemberVisibilityCanBePrivate" )
8
10
class KotlinJsCompilation : AbstractKotlinCompilation <K2JSCompilerArguments >() {
@@ -79,7 +81,8 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
79
81
args.noStdlib = true
80
82
81
83
args.moduleKind = " commonjs"
82
- args.outputFile = File (outputDir, outputFileName).absolutePath
84
+ args.outputDir = outputDir.absolutePath // -ir-output-dir
85
+ args.moduleName = Paths .get(outputFileName).nameWithoutExtension // -ir-output-name
83
86
args.sourceMapBaseDirs = jsClasspath().joinToString(separator = File .pathSeparator)
84
87
args.libraries = listOfNotNull(kotlinStdLibJsJar).joinToString(separator = " :" )
85
88
You can’t perform that action at this time.
0 commit comments