diff --git a/.changeset/short-balloons-jam.md b/.changeset/short-balloons-jam.md index 63d1f6a..810c4f6 100644 --- a/.changeset/short-balloons-jam.md +++ b/.changeset/short-balloons-jam.md @@ -1,5 +1,5 @@ --- -"vite-plugin-pagefind": patch +'vite-plugin-pagefind': patch --- Fixed hardcoded buildDir diff --git a/CHANGELOG.md b/CHANGELOG.md index 31d5068..f384d1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,22 +4,22 @@ ### Patch Changes -- 04163e9: Added cwd option that defaults to process.cwd, added default to buildDir: build +- 04163e9: Added cwd option that defaults to process.cwd, added default to buildDir: build ## 0.0.4 ### Patch Changes -- 93731cd: Bugfix: Had colorette as devDep causing issues with the plugin +- 93731cd: Bugfix: Had colorette as devDep causing issues with the plugin ## 0.0.3 ### Patch Changes -- 2f8a075: Only packaging dist files now +- 2f8a075: Only packaging dist files now ## 0.0.2 ### Patch Changes -- a969687: Released package +- a969687: Released package diff --git a/package.json b/package.json index 1cfe368..b6fa356 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "dist" ], "scripts": { - "dev": "tsup src/index.ts --format esm --dts-resolve --dts --watch", - "build": "tsup src/index.ts --format esm --dts-resolve --dts --minify --out-dir dist", + "dev": "tsup src/index.ts --format esm --dts --out-dir dist --watch", + "build": "tsup src/index.ts --format esm --dts --out-dir dist", "format": "prettier --write .", "release": "pnpm build && changeset publish" }, diff --git a/src/index.ts b/src/index.ts index 39a7277..41a8652 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,13 +7,13 @@ function log(input: string) { console.log(`${green('[vite-plugin-pagefind]')} ${input}`); } -type PagefindConfig = { +export type PagefindConfig = { pagefindDir: string; buildDir?: string; cwd?: string; }; -export default function ({ +export function pagefind({ pagefindDir, buildDir = 'build', cwd = process.cwd()