Skip to content

Commit

Permalink
fix(vite-plugin-angular): import marked setup service dynamically (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts authored Feb 8, 2024
1 parent 2b5e8e6 commit 4d2ecbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite-plugin-angular/src/lib/host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { normalizePath } from '@ngtools/webpack/src/ivy/paths';
import { readFileSync } from 'node:fs';
import * as ts from 'typescript';
import { compileAnalogFile } from './authoring/analog';
import { MarkedSetupService } from './authoring/marked-setup.service';
import { TEMPLATE_TAG_REGEX } from './authoring/constants';

export function augmentHostWithResources(
Expand Down Expand Up @@ -98,6 +97,9 @@ export function augmentHostWithResources(
}

if (fileName.includes('virtual-analog:')) {
const { MarkedSetupService } = await import(
'./authoring/marked-setup.service'
);
// read template sections, parse markdown
const markedSetupService = new MarkedSetupService();
const mdContent = markedSetupService
Expand Down

0 comments on commit 4d2ecbd

Please sign in to comment.