File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ Meteor.startup(() => {
8383 const webuiServer = staticServe ( public_dir , {
8484 index : false , // Performed manually
8585 } )
86- koaApp . use ( KoaMount ( getRootSubpath ( ) , webuiServer ) )
86+ koaApp . use ( KoaMount ( getRootSubpath ( ) || '/' , webuiServer ) )
8787 logger . debug ( `Serving static files from ${ public_dir } ` )
8888
8989 if ( Meteor . isDevelopment ) {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ import { DocumentTitleProvider } from '../lib/DocumentTitleProvider'
3939import { catchError , firstIfArray , isRunningInPWA } from '../lib/lib'
4040import { protectString } from '@sofie-automation/shared-lib/dist/lib/protectedString'
4141import { useUserPermissions , UserPermissionsContext } from './UserPermissions'
42- import { ROOT_URL_PATH_PREFIX } from '../url'
42+ import { relativeToSiteRootUrl , ROOT_URL_PATH_PREFIX } from '../url'
4343
4444const NullComponent = ( ) => null
4545
Original file line number Diff line number Diff line change @@ -26,15 +26,15 @@ await Promise.all([
2626 findCommonJsPathsForLibrary ( '@sofie-automation/meteor-lib/dist' , '../meteor-lib/dist' ) ,
2727] )
2828
29- const basePath = process . env . SOFIE_BASE_PATH || '/ '
29+ const basePath = process . env . SOFIE_BASE_PATH || ''
3030
3131// https://vitejs.dev/config/
3232export default defineConfig ( ( { command } ) => ( {
3333 plugins : [ react ( ) , tsconfigPaths ( ) , nodePolyfills ( ) ] ,
3434
3535 // In production, build relative so that paths inside the scss files are correct. This makes a mess in the html, but we can fix that on the fly
3636 // In dev, use the specified base path
37- base : command === 'build' ? '' : basePath ,
37+ base : command === 'build' ? '' : basePath || '/' ,
3838
3939 optimizeDeps : {
4040 include : [
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ function watchMeteor() {
7070 name : "VITE" ,
7171 prefixColor : "yellow" ,
7272 env : {
73- SOFIE_BASE_PATH : rootUrl . pathname . length > 1 ? rootUrl . pathname : '' ,
73+ SOFIE_BASE_PATH : rootUrl && rootUrl . pathname . length > 1 ? rootUrl . pathname : '' ,
7474 } ,
7575 } ,
7676 ] ;
You can’t perform that action at this time.
0 commit comments