Skip to content

Build your personal knowledge base with Trilium Notes

use var instead of const to avoid webpack issue in mobile frontend build, closes #1300

zadamc71ac0302a66
diff --git a/bin/build-server.sh b/bin/build-server.sh
index 18b4b4d09b..a15032fa11 100755
--- a/bin/build-server.sh
+++ b/bin/build-server.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
PKG_DIR=dist/trilium-linux-x64-server
-NODE_VERSION=12.18.3
+NODE_VERSION=12.19.0
if [ "$1" != "DONTCOPY" ]
then
diff --git a/bin/copy-trilium.sh b/bin/copy-trilium.sh
index 578d8b9892..e054c2fc98 100755
--- a/bin/copy-trilium.sh
+++ b/bin/copy-trilium.sh
@@ -7,6 +7,10 @@ fi
npm run webpack
+# problem with circular dependencies: https://github.com/webpack/webpack/issues/9173
+# source issue: https://github.com/zadam/trilium/issues/1300
+find ./src/public/app-dist -type f -exec sed -i 's/const /var /g' {} +
+
DIR=$1
rm -rf $DIR