Lazy-load puppeteer to fix tsx watch hanging on startup

Puppeteer import at top level was blocking tsx watch mode,
preventing the server from starting. Now imported dynamically
only when a JS-rendered store is actually scraped.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
mariosemes
2026-03-26 22:08:09 +01:00
parent 42f2cab158
commit fe56c3b17e
2 changed files with 5 additions and 4 deletions

View File

@@ -4,9 +4,9 @@
"private": true,
"type": "module",
"scripts": {
"dev:server": "tsx watch src/server/index.ts",
"dev:server": "tsx watch --clear-screen=false src/server/index.ts",
"dev:client": "cd src/client && npm run dev",
"dev": "concurrently \"npm run dev:server\" \"npm run dev:client\"",
"dev": "concurrently --names server,client \"npm run dev:server\" \"npm run dev:client\"",
"build:client": "cd src/client && npm run build",
"build:server": "tsc",
"build": "npm run build:client && npm run build:server",