Skip to content

Commit

Permalink
refactor: use fs.mkdir instead of mkdirp
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 17, 2023
1 parent 87bea65 commit 8e6962e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { defu } from "defu";
import { createHooks } from "hookable";
import prettyBytes from "pretty-bytes";
import { globby } from "globby";
import mkdirp from "mkdirp";
import { dumpObject, rmdir, tryRequire, resolvePreset } from "./utils";
import type { BuildContext, BuildConfig, BuildOptions } from "./types";
import { validatePackage, validateDependencies } from "./validate";
Expand Down Expand Up @@ -170,7 +169,7 @@ export async function build(
if (options.clean) {
for (const dir of new Set(options.entries.map((e) => e.outDir).sort())) {
await rmdir(dir!);
await mkdirp(dir!);
await fsp.mkdir(dir!, { recursive: true });
}
}

Expand Down

0 comments on commit 8e6962e

Please sign in to comment.