1

Previously I use the IDEA built-in system to build my kotlinJs project. Today when I migrate it to use the official gradle kotlin2js plugin.

I met a problem.

Previously, I can get the generated libs file like kotlin.js and kotlinx-html-js.js.

But now it seems that I can't get them even when use the buildDependents gradle task.

How to get them?

Or even better, how to bundle them together like the Webpack?

1 Answer 1

1

The simplest solution I know is to use JS DCE plugin with "development mode" enabled: https://kotlinlang.org/docs/reference/javascript-dce.html#development-mode

Alternatively you could create a Copy task, which looks at the dependencies, and extracts .js files from those (look for task assembleWeb in the tutorial: https://kotlinlang.org/docs/tutorials/javascript/getting-started-gradle/getting-started-with-gradle.html)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.