Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
3flex committed Sep 20, 2023
1 parent 7265398 commit bd83486
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package com.tschuchort.compiletesting
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
import org.jetbrains.kotlin.cli.js.K2JSCompiler
import java.io.*
import java.nio.file.Paths
import kotlin.io.path.nameWithoutExtension

@Suppress("MemberVisibilityCanBePrivate")
class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
Expand Down Expand Up @@ -79,7 +81,8 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
args.noStdlib = true

args.moduleKind = "commonjs"
args.outputFile = File(outputDir, outputFileName).absolutePath
args.outputDir = outputDir.absolutePath // -ir-output-dir
args.moduleName = Paths.get(outputFileName).nameWithoutExtension // -ir-output-name
args.sourceMapBaseDirs = jsClasspath().joinToString(separator = File.pathSeparator)
args.libraries = listOfNotNull(kotlinStdLibJsJar).joinToString(separator = ":")

Expand Down

0 comments on commit bd83486

Please sign in to comment.