diff --git a/apps/doc-gen/src/app/docgen/templates.ts b/apps/doc-gen/src/app/docgen/templates.ts index cee8f12c75..57a2c87863 100644 --- a/apps/doc-gen/src/app/docgen/templates.ts +++ b/apps/doc-gen/src/app/docgen/templates.ts @@ -57,7 +57,7 @@ async function readPartials() { const partials: NonNullable = {}; const partialNames = ["common", "contract", "enum", "error", "event", "function", "modifier", "page", "struct", "variable", "user-defined-value-type"] for (const name of partialNames) { - const p = await import('raw-loader!./themes/markdown/' + name + '.hbs') + const p = await import(`raw-loader!${window.location.pathname}/themes/markdown/${name}.hbs`) partials[name] = () => p.default } return partials; @@ -66,7 +66,7 @@ async function readPartials() { async function readHelpers(name: string) { let helpersPath; - const h = await import('./themes/markdown/helpers'); + const h = await import(`${window.location.pathname}/themes/markdown/helpers'); const helpers: Record any> = {}; for (const name in h) {