From 73f2ccc16b63160516e0a2376d608902fbf316b5 Mon Sep 17 00:00:00 2001 From: Felix Mosheev <9304194+felixmosh@users.noreply.github.com> Date: Tue, 16 May 2023 10:13:44 +0300 Subject: [PATCH] fix: add a new options config to setup uiBasePath by the user, closes #570 --- packages/api/src/index.ts | 2 +- packages/api/typings/app.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts index e762578d..46d5b9df 100644 --- a/packages/api/src/index.ts +++ b/packages/api/src/index.ts @@ -15,7 +15,7 @@ export function createBullBoard({ options?: BoardOptions; }) { const { bullBoardQueues, setQueues, replaceQueues, addQueue, removeQueue } = getQueuesApi(queues); - const uiBasePath = path.dirname(eval(`require.resolve('@bull-board/ui/package.json')`)); + const uiBasePath = options.uiBasePath || path.dirname(eval(`require.resolve('@bull-board/ui/package.json')`)); serverAdapter .setQueues(bullBoardQueues) diff --git a/packages/api/typings/app.ts b/packages/api/typings/app.ts index 5a1bff75..3fb2eb93 100644 --- a/packages/api/typings/app.ts +++ b/packages/api/typings/app.ts @@ -167,6 +167,7 @@ export interface Pagination { export type FormatterField = 'data' | 'returnValue' | 'name'; export type BoardOptions = { + uiBasePath?: string; uiConfig: UIConfig; };