Skip to content

Commit

Permalink
fix(prerender): use internal typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Aug 21, 2020
1 parent fa480b6 commit 8f0bb51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/prerender/prerender-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type * as d from '../../declarations';
import { catchError, loadTypeScriptDiagnostics } from '@utils';
import { IS_NODE_ENV, requireFunc } from '../sys/environment';
import { resolve } from 'path';
import ts from 'typescript';

export const getPrerenderConfig = (diagnostics: d.Diagnostic[], prerenderConfigPath: string) => {
const prerenderConfig: d.PrerenderConfig = {};
Expand All @@ -23,7 +24,6 @@ const nodeRequireTsConfig = (diagnostics: d.Diagnostic[], prerenderConfigPath: s

try {
const fs: typeof import('fs') = requireFunc('fs');
const ts: typeof import('typescript') = requireFunc('typescript');

// ensure we cleared out node's internal require() cache for this file
delete require.cache[resolve(prerenderConfigPath)];
Expand Down

0 comments on commit 8f0bb51

Please sign in to comment.