Skip to content

Commit c69b8a9

Browse files
ryan-williamsclaude
andcommitted
fix(create-app): allowlist better-sqlite3 build in scaffold template
pnpm 11 (`strictDepBuilds: true`) hard-errors a fresh install when a dependency has an unapproved build script. `@slidev/cli` pulls in the native `better-sqlite3` (optionalDependency, for the dev editor's deck-state history), so scaffolded projects and the Smoke test failed at install with `ERR_PNPM_IGNORED_BUILDS`. Add it to the template's `allowBuilds` alongside `playwright-chromium`, so a scaffolded deck builds the native binary up-front and gets full undo/redo history. A consumer that prefers no native build can move it to `ignoredBuiltDependencies` (the cli degrades to `LocalStateClient` — see the prior `fix(state)` commit). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7f597ea commit c69b8a9

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
shamefullyHoist: true
22

3-
# `playwright-chromium` is needed for `slidev export` (PDF/PNG/PPTX) and has a
4-
# postinstall script that downloads the browser. pnpm v11 errors on unapproved
5-
# build scripts by default (`strictDepBuilds: true`), so allowlist it up-front.
3+
# pnpm v11 errors on unapproved dependency build scripts by default
4+
# (`strictDepBuilds: true`), so allowlist the ones slidev pulls in:
5+
# - `playwright-chromium`: needed for `slidev export` (PDF/PNG/PPTX); its
6+
# postinstall downloads the browser.
7+
# - `better-sqlite3`: backs the dev editor's deck-state history (undo/redo,
8+
# version drawer). It's an optionalDependency of `@slidev/cli` and the dev
9+
# server degrades gracefully without it, but allowlisting it builds the native
10+
# binary up-front so the history features work. To skip it instead (no native
11+
# build), move it to `ignoredBuiltDependencies` rather than deleting the line —
12+
# otherwise pnpm re-errors on the unapproved script.
613
allowBuilds:
14+
better-sqlite3: true
715
playwright-chromium: true

0 commit comments

Comments
 (0)