Skip to content

Commit

Permalink
chore: fix win
Browse files Browse the repository at this point in the history
  • Loading branch information
SoonIter committed Aug 13, 2024
1 parent 4dc18e3 commit 1ee8ec2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/plugin-dts/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import fsP from 'node:fs/promises';
import { platform } from 'node:os';
import path, { join } from 'node:path';
import { type RsbuildConfig, logger } from '@rsbuild/core';
import fg, { convertPathToPattern } from 'fast-glob';
import fg from 'fast-glob';
import color from 'picocolors';
import type { DtsEntry } from 'src';
import * as ts from 'typescript';

const { convertPathToPattern } = fg;

export function loadTsconfig(tsconfigPath: string): ts.ParsedCommandLine {
const configFile = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
const configFileContent = ts.parseJsonConfigFileContent(
Expand All @@ -31,7 +33,7 @@ export function ensureTempDeclarationDir(cwd: string): string {

fs.mkdirSync(dirPath, { recursive: true });

const gitIgnorePath = path.join(cwd, `${TEMP_FOLDER}/.gitignore`);
const gitIgnorePath = path.join(cwd, TEMP_FOLDER, '.gitignore');
fs.writeFileSync(gitIgnorePath, '**/*\n');

return dirPath;
Expand Down

0 comments on commit 1ee8ec2

Please sign in to comment.