From 92b06765113c4afc7487735aad4412a8fa5546ae Mon Sep 17 00:00:00 2001 From: Marek Piasecki Date: Tue, 17 Jan 2023 00:07:58 +0100 Subject: [PATCH] change - to consider all Views on first render --- bin/pro-router.imba | 2 +- src/index.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/pro-router.imba b/bin/pro-router.imba index a8ab791..71ebe2a 100644 --- a/bin/pro-router.imba +++ b/bin/pro-router.imba @@ -60,7 +60,7 @@ def importRouter return status: true, message: "import definition already there" else try - nfs.writeFileSync indexFile, "import './router.imba'\n" + indexContent + nfs.writeFileSync indexFile, "import './router.imba'\n" + indexContent + "\nR.url_changed() // the best if you move it right before imba.mount" return status: true, message: "definition added successfuly" catch return status: false, message: "failed during writing to file" diff --git a/src/index.js b/src/index.js index 4273cd6..f72e144 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,3 @@ import './router.imba' -if(import.meta.env.MODE == 'development'){ - import("./main.imba") -} \ No newline at end of file +import './main.imba' +R.url_changed() // the best if you move it right before imba.mount \ No newline at end of file