Skip to content

Commit 8704ff8

Browse files
committed
fix: sofie logo not showing in dev
1 parent c6be9f5 commit 8704ff8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

meteor/server/lib.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import fs from 'fs'
44
import path from 'path'
55
import { logger } from './logging'
66
import { stringifyError } from '@sofie-automation/shared-lib/dist/lib/stringifyError'
7+
import { Meteor } from 'meteor/meteor'
78

89
/** Returns absolute path to programs/server directory of your compiled application, without trailing slash. */
910
export function getAbsolutePath(): string {
@@ -27,7 +28,10 @@ export function extractFunctionSignature(f: Function): string[] | undefined {
2728
export type Translations = Record<string, string>
2829

2930
// The /public directory in a Meteor app
30-
export const public_dir = path.join(process.cwd(), '../web.browser/app')
31+
export const public_dir = Meteor.isProduction
32+
? path.join(process.cwd(), '../web.browser/app')
33+
: // In development, find the webui package and use its public directory
34+
path.join(process.cwd(), '../../../../../../packages/webui/public')
3135

3236
/**
3337
* Get the i18next locale object for a given `languageCode`. If the translations file can not be found or it can't be

packages/webui/vite.config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export default defineConfig({
5959
'/api': 'http://127.0.0.1:3000',
6060
'/site.webmanifest': 'http://127.0.0.1:3000',
6161
'/meteor-runtime-config.js': 'http://127.0.0.1:3000',
62+
'/images/sofie-logo.svg': 'http://127.0.0.1:3000',
6263
'/websocket': {
6364
target: `ws://127.0.0.1:3000`,
6465
ws: true,

0 commit comments

Comments
 (0)