Tuna
05/07/2023, 1:34 PM// package.json
{
"devDependencies": {
"live-server": "^1.2.2",
"nodemon": "^2.0.22",
"npm-run-all": "^4.1.5"
},
"scripts": {
"watch": "nodemon",
"serve": "live-server --host=localhost --port=8080 build/developmentExecutable/",
"dev": "run-p watch serve"
},
"nodemonConfig": {
"verbose": true,
"ignore": [
"**/src/test/**",
"**/build/**"
],
"ext": "kt,scss,html",
"exec": "./gradlew browserDevelopmentExecutableDistribution",
"delay": 2500
}
}
I came up with this solution since while developing my app (MonoSketch) ./gradlew browserDevelopmentRun --continuous
(also jsBrowserRun
for KMP when I tried to convert the project to KMP) does not reflex the new code.
I tried several way to fix (like -Dorg.gradle.parallel=false
) but after a day or two, it does not work again.
The solution with NodeJS works more stable and does not auto reload whenever I just save the code (browserDevelopmentRun
triggers hot reload on save before the code is compiled).browserDevelopmentRun
when it works well.