From 48366ce039309ff8cd8d516a67444a73a247ab72 Mon Sep 17 00:00:00 2001 From: codehz Date: Mon, 4 Dec 2023 15:32:25 +0800 Subject: [PATCH] fix build type --- build.ts | 6 +++--- scripts/dist.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.ts b/build.ts index e300651..9fda71e 100644 --- a/build.ts +++ b/build.ts @@ -1,4 +1,4 @@ -import { BunPlugin, Glob, fileURLToPath, pathToFileURL } from "bun"; +import { Glob, fileURLToPath, pathToFileURL } from "bun"; import { unlink } from "node:fs/promises"; import { basename, join } from "node:path"; @@ -11,7 +11,7 @@ function glob( pattern = "**/*.{ts,tsx,js,jsx}" ): AsyncIterableIterator { const glob = new Glob(pattern); - return glob.scan({ cwd: path, onlyFiles: true, absolute: true }) + return glob.scan({ cwd: path, onlyFiles: true, absolute: true }); } export async function build({ @@ -31,7 +31,7 @@ export async function build({ sourcemap?: "external" | "none" | "inline"; minify?: boolean; define?: Record; - plugins?: BunPlugin[]; + plugins?: import("bun").BunPlugin[]; }) { const entrypoints = [join(baseDir, hydrate)]; const absPageDir = join(baseDir, pageDir); diff --git a/scripts/dist.ts b/scripts/dist.ts index 72253b8..ec50ce2 100644 --- a/scripts/dist.ts +++ b/scripts/dist.ts @@ -20,7 +20,7 @@ await Bun.build({ sourcemap: "inline", external: ["react", "react-dom"], entrypoints: [...(await glob("*.ts"))], - plugins: [dts({})], + plugins: [dts()], }); for (const file of [