fix(server): no longer working subdir due to assets (fixes #2098)

This commit is contained in:
Elian Doran
2025-06-06 22:57:00 +03:00
parent 68d094d119
commit c18451a378
4 changed files with 19 additions and 3 deletions

View File

@@ -133,7 +133,7 @@ export default class ExcalidrawTypeWidget extends TypeWidget {
// currently required by excalidraw, in order to allows self-hosting fonts locally.
// this avoids making excalidraw load the fonts from an external CDN.
(window as any).EXCALIDRAW_ASSET_PATH = `${new URL(import.meta.url).origin}/node_modules/@excalidraw/excalidraw/dist/prod`;
(window as any).EXCALIDRAW_ASSET_PATH = `${window.location.pathname}/node_modules/@excalidraw/excalidraw/dist/prod`;
// temporary vars
this.currentNoteId = "";

View File

@@ -102,7 +102,7 @@ export function buildConfig(): EditorConfig {
allowedProtocols: ALLOWED_PROTOCOLS
},
emoji: {
definitionsUrl: new URL(import.meta.url).origin + emojiDefinitionsUrl
definitionsUrl: emojiDefinitionsUrl
},
syntaxHighlighting: {
loadHighlightJs: async () => {