fix(extension): write prism assets to selected output dir

Respect PLAYWRITER_EXTENSION_DIST in the Prism download step so release builds include welcome page Prism scripts in dist-release/src instead of polluting dist/src.
This commit is contained in:
Tommy D. Rossi
2026-03-12 15:36:37 +01:00
parent 36f3801451
commit df7476af06
3 changed files with 10 additions and 3 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## 0.0.76
### Bug Fixes
- **Write Prism assets to the active extension output directory**: `scripts/download-prism.ts` now respects `PLAYWRITER_EXTENSION_DIST` instead of always writing to `dist/src`. This fixes release builds (`dist-release`) missing `prism.min.js` and `prism-bash.min.js` used by `welcome.html`.
## 0.0.75
### Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Playwriter",
"version": "0.0.75",
"version": "0.0.76",
"description": "Automate your Browser using Cursor, Claude, VS Code. More capable and context efficient than Playwright MCP.",
"permissions": [
"debugger",
+3 -2
View File
@@ -1,11 +1,12 @@
// Downloads Prism.js assets into dist/src/ for the welcome page.
// Downloads Prism.js assets into <outDir>/src/ for the welcome page.
// Chrome extension CSP blocks external scripts, so we bundle them locally.
import https from 'node:https'
import fs from 'node:fs'
import path from 'node:path'
const BASE = 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/'
const DEST = path.join('dist', 'src')
const outDir = process.env.PLAYWRITER_EXTENSION_DIST || 'dist'
const DEST = path.join(outDir, 'src')
const files: [string, string][] = [
['prism.min.js', 'prism.min.js'],