diff --git a/meteor/server/lib.ts b/meteor/server/lib.ts index a58d10c534..1c944e58a2 100644 --- a/meteor/server/lib.ts +++ b/meteor/server/lib.ts @@ -4,6 +4,7 @@ import fs from 'fs' import path from 'path' import { logger } from './logging' import { stringifyError } from '@sofie-automation/shared-lib/dist/lib/stringifyError' +import { Meteor } from 'meteor/meteor' /** Returns absolute path to programs/server directory of your compiled application, without trailing slash. */ export function getAbsolutePath(): string { @@ -27,7 +28,10 @@ export function extractFunctionSignature(f: Function): string[] | undefined { export type Translations = Record // The /public directory in a Meteor app -export const public_dir = path.join(process.cwd(), '../web.browser/app') +export const public_dir = Meteor.isProduction + ? path.join(process.cwd(), '../web.browser/app') + : // In development, find the webui package and use its public directory + path.join(process.cwd(), '../../../../../../packages/webui/public') /** * Get the i18next locale object for a given `languageCode`. If the translations file can not be found or it can't be diff --git a/packages/webui/vite.config.mts b/packages/webui/vite.config.mts index ed80e5b1df..c6741908d2 100644 --- a/packages/webui/vite.config.mts +++ b/packages/webui/vite.config.mts @@ -66,6 +66,7 @@ export default defineConfig({ '/api': 'http://127.0.0.1:3000', '/site.webmanifest': 'http://127.0.0.1:3000', '/meteor-runtime-config.js': 'http://127.0.0.1:3000', + '/images/sofie-logo.svg': 'http://127.0.0.1:3000', '/websocket': { target: `ws://127.0.0.1:3000`, ws: true,