From 9bdcc4949dfb1984366dcc19278ef6d88e4c994e Mon Sep 17 00:00:00 2001 From: hugos68 Date: Sat, 27 Jan 2024 22:53:32 +0100 Subject: [PATCH] Hopefully fixed sigh --- .changeset/nervous-rabbits-sleep.md | 5 +++++ package.json | 5 ++--- src/index.ts | 2 ++ tsconfig.json | 14 +++----------- 4 files changed, 12 insertions(+), 14 deletions(-) create mode 100644 .changeset/nervous-rabbits-sleep.md diff --git a/.changeset/nervous-rabbits-sleep.md b/.changeset/nervous-rabbits-sleep.md new file mode 100644 index 0000000..20df200 --- /dev/null +++ b/.changeset/nervous-rabbits-sleep.md @@ -0,0 +1,5 @@ +--- +"vite-plugin-pagefind": patch +--- + +Fixed pagefind post build not running after the build process diff --git a/package.json b/package.json index 3d4c12b..26fbdd4 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "dist" ], "scripts": { - "dev": "tsup src/index.ts --format esm --dts --out-dir dist --watch", - "build": "tsup src/index.ts --format esm --dts --out-dir dist", + "dev": "tsc -w", + "build": "tsc", "format": "prettier --write .", "release": "pnpm build && changeset publish" }, @@ -28,7 +28,6 @@ "@changesets/cli": "^2.27.1", "@types/node": "^20.11.8", "prettier": "3.2.4", - "tsup": "^8.0.1", "typescript": "^5.3.3" }, "dependencies": { diff --git a/src/index.ts b/src/index.ts index 41a8652..2de1724 100644 --- a/src/index.ts +++ b/src/index.ts @@ -46,6 +46,8 @@ export function pagefind({ return { name: 'pagefind', + enforce: 'post', + apply: 'build', configureServer, closeBundle }; diff --git a/tsconfig.json b/tsconfig.json index 9849ee6..0505412 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,17 +1,9 @@ { - "display": "Node 20", - "_version": "20.1.0", "compilerOptions": { "outDir": "dist", - "lib": ["es2023"], - "module": "node16", - "target": "es2022", - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "noUncheckedIndexedAccess": true, - "moduleResolution": "node16" + "module": "NodeNext", + "declaration": true, + "declarationMap": true }, "include": ["./src/index.ts"] }