Skip to content

Instantly share code, notes, and snippets.

@wmira
Last active May 17, 2020 17:06
Show Gist options
  • Save wmira/05757529ee465966eddb290d3e0f4bcf to your computer and use it in GitHub Desktop.
Save wmira/05757529ee465966eddb290d3e0f4bcf to your computer and use it in GitHub Desktop.
KotlinJS Notes

Trying to get my feet wet with kotlinjs. Here are a few things that are not so obvious that could help you.

  1. Make sure you use the Gradle > Kotlin Javascript. This has all the tools you need for auto reload/compile etc.
  2. When you run the project from Intellij, add the --continuous arguments from within IntelliJ Run. This ensures that when you do any changes, your project gets recompiled and reloaded automatically on your browser.
  3. Edit src/resources/index.html. The <script> tag has the bundled js code is under the head element. This will cause issue because your javascript will get executed before the whole document is rendered. Place before the end of the body closing tag.

Ref:

https://www.youtube.com/watch?v=Ien9yXhKLsU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment