You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[//]: #(title: Development server and continuous compilation)
2
2
3
-
Instead of manually compiling and executing a Kotlin/JS project every time you want to see the changes you made,
4
-
you can use the _continuous compilation_ mode. Instead of using the regular `jsBrowserDevelopmentRun` (for `browser`) and `jsNodeDevelopmentRun` (for `nodejs`) command, invoke the Gradle wrapper
5
-
in _continuous_ mode:
3
+
Instead of manually compiling and running your Kotlin/JS project each time you want to see the changes you made,
4
+
you can use the _continuous compilation_ mode. Rather than using the regular `jsBrowserDevelopmentRun` (for `browser`) and `jsNodeDevelopmentRun` (for `nodejs`) command, invoke the Gradle wrapper
5
+
in continuous mode:
6
6
7
7
```bash
8
-
#for `browser` project
8
+
#For `browser` project
9
9
./gradlew jsBrowserDevelopmentRun --continuous
10
10
11
-
#for `nodejs` project
11
+
#For `nodejs` project
12
12
./gradlew jsNodeDevelopmentRun --continuous
13
13
```
14
14
15
-
If you are working in IntelliJ IDEA, you can pass the same flag via the _run configuration_. After running the Gradle
16
-
run task for the first time from the IDE, IntelliJ IDEA automatically generates a run configuration for it,
17
-
which you can edit:
15
+
If you are working in IntelliJ IDEA, you can pass the same flag via the list of run configurations. After running the
16
+
`jsBrowserDevelopmentRun` Gradle task for the first time from the IDE, IntelliJ IDEA automatically generates a run configuration for it,
17
+
which you can edit at the top toolbar:
18
18
19
19
{width=700}
20
20
21
-
Enabling continuous mode via the **Run/Debug Configurations** dialog is as easy as adding the `--continuous` flag to the
21
+
Enable continuous mode via the **Run/Debug Configurations** dialog by adding the `--continuous` flag to the
22
22
arguments for the run configuration:
23
23
24
24
{width=700}
@@ -27,6 +27,6 @@ When executing this run configuration, you can note that the Gradle process cont
27
27
28
28
{width=700}
29
29
30
-
Once a change has been detected, the program will be recompiled automatically. If you still have the page open in the browser,
31
-
the development server will trigger an automatic reload of the page, and the changes will become visible.
32
-
This is thanks to the integrated `webpack-dev-server` that is managed by the Kotlin Multiplatform Gradle plugin.
30
+
Once a change has been detected, the program is recompiled automatically. If you still have the web page open in the browser,
31
+
the development server triggers an automatic reload of the page, and the changes become visible.
32
+
This is thanks to the integrated [`webpack-dev-server`](https://webpack.js.org/configuration/dev-server/) that is managed by the [Kotlin Multiplatform Gradle plugin](https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-dsl-reference.html).
0 commit comments