Skip to content

Commit

Permalink
fixup! feat(scripts): add v8 package compilation if TS path aliases a…
Browse files Browse the repository at this point in the history
…re used
  • Loading branch information
Hotell committed Nov 25, 2022
1 parent 91cffcc commit 556d2cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/tasks/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as fs from 'fs';
import * as path from 'path';
import * as jju from 'jju';
import type { TscTaskOptions } from 'just-scripts';
import { stripJsonComments } from '@nrwl/devkit';

export function getTsPathAliasesConfig() {
const cwd = process.cwd();
Expand All @@ -21,7 +22,7 @@ export function getTsPathAliasesConfigV8() {
const cwd = process.cwd();
const tsConfigFile = 'tsconfig.json';
const tsConfigPath = path.join(cwd, `./${tsConfigFile}`);
const tsConfig = JSON.parse(fs.readFileSync(tsConfigPath, 'utf-8'));
const tsConfig = JSON.parse(stripJsonComments(fs.readFileSync(tsConfigPath, 'utf-8')));
const isUsingV8pathAliases = tsConfig.extends && tsConfig.extends.includes('tsconfig.base.v8.json');
return { isUsingV8pathAliases, tsConfigFileV8: tsConfigFile };
}
Expand Down

0 comments on commit 556d2cb

Please sign in to comment.