From 0c2d7a7c66f37223f39ed184bc7da16f3fde4351 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Wed, 3 Jun 2020 12:29:42 +0100 Subject: [PATCH] bugfix: links not respecting appRootPath --- packages/server/src/api/index.js | 1 + packages/server/src/utilities/builder/buildPage.js | 3 +-- packages/standard-components/src/Link.svelte | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.js index 66c3168f23..990714fdc7 100644 --- a/packages/server/src/api/index.js +++ b/packages/server/src/api/index.js @@ -38,6 +38,7 @@ router ctx.config = { latestPackagesFolder: budibaseAppsDir(), jwtSecret: env.JWT_SECRET, + useAppRootPath: true, } ctx.isDev = env.NODE_ENV !== "production" && env.NODE_ENV !== "jest" await next() diff --git a/packages/server/src/utilities/builder/buildPage.js b/packages/server/src/utilities/builder/buildPage.js index e56e040329..f1b5d6d724 100644 --- a/packages/server/src/utilities/builder/buildPage.js +++ b/packages/server/src/utilities/builder/buildPage.js @@ -28,8 +28,7 @@ module.exports = async (config, appId, pageName, pkg) => { await savePageJson(appPath, pageName, pkg) } -const rootPath = (config, appname) => - config.useAppRootPath ? `/${appname}` : "" +const rootPath = (config, appId) => (config.useAppRootPath ? `/${appId}` : "") const copyClientLib = async (appPath, pageName) => { const sourcepath = require.resolve("@budibase/client") diff --git a/packages/standard-components/src/Link.svelte b/packages/standard-components/src/Link.svelte index ef0b71d62e..d557df6abd 100644 --- a/packages/standard-components/src/Link.svelte +++ b/packages/standard-components/src/Link.svelte @@ -13,7 +13,7 @@ $: target = openInNewTab ? "_blank" : "_self" -{text} +{text}