Skip to content

Commit

Permalink
refactor(copy): switch to native fs.copyFile function
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightjack committed Apr 25, 2024
1 parent 51aa2db commit 034b89a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
2 changes: 0 additions & 2 deletions package.json
Expand Up @@ -40,7 +40,6 @@
"consola": "^3.2.3",
"defu": "^6.1.4",
"esbuild": "^0.20.2",
"fs-extra": "^11.2.0",
"globby": "^14.0.1",
"hookable": "^5.5.3",
"jiti": "^1.21.0",
Expand All @@ -57,7 +56,6 @@
"untyped": "^1.4.2"
},
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"@types/node": "^20.12.5",
"@vitest/coverage-v8": "^1.4.0",
"changelogen": "^0.5.5",
Expand Down
19 changes: 0 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/builder/copy.ts
@@ -1,6 +1,6 @@
import { promises as fsp } from "node:fs";
import { relative, resolve } from "pathe";
import { globby } from "globby";
import { copy } from "fs-extra";
import { symlink, rmdir, warn } from "../utils";
import type { CopyBuildEntry, BuildContext } from "../types";

Expand All @@ -24,7 +24,7 @@ export async function copyBuild(ctx: BuildContext) {
paths.map(async (path) => {
const src = resolve(ctx.options.rootDir, entry.input, path);
const dist = resolve(ctx.options.rootDir, distDir, path);
await copy(src, dist);
await fsp.copyFile(src, dist);
return dist;
}),
);
Expand Down

0 comments on commit 034b89a

Please sign in to comment.