Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion meteor/server/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -27,7 +28,10 @@ export function extractFunctionSignature(f: Function): string[] | undefined {
export type Translations = Record<string, string>

// 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
Expand Down
1 change: 1 addition & 0 deletions packages/webui/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,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,
Expand Down
Loading