Is there still a maven plugin for js? I know there...
# javascript
p
Is there still a maven plugin for js? I know there used to be with 1.0 or 1.1 but nowadays maven is barely mentioned on the docs page
b
I doubt it, since mpp only aims to support gradle. Maven plugin for k/jvm is only there because it's a big part of jvm ecosystem still. This does not apply to js so why bother?
p
many of the jvm projects are backends which could be converted to fullstack if there was a js maven plugin
the js plugin is still available as a standalone plugin in gradle... so I thought maybe in maven too but I cannot find anything
b
Yeah, I wish they'd just drop standalone js gradle plugin and focus on mpp instead. But that's just my two cents.
p
as it turns out the old maven configuration options for js still work. it is just not documented anywhere
Copy code
<dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-js</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>

                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>js</goal>
                        </goals>
                        <configuration>
                            <sourceMap>true</sourceMap>
                            <sourceDirs>src/main/kotlin</sourceDirs>
                            <outputFile>${project.build.outputDirectory}/${project.artifactId}.js</outputFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>