Fix PhotoCraft snippet preload path
Validate, publish and promote photocraft / validate (push) Successful in 10s
Validate, publish and promote photocraft / publish (push) Successful in 30s

This commit is contained in:
feedc0de committed 2026-11-08 11:48:42 +01:00
1 parent 2273fdfb37
commit 54026b11e0
1 file changed
+9
+9
View File
@@ -32,3 +32,12 @@ with tempfile.TemporaryDirectory() as tmp:
shutil.copytree(source, destination)
else:
shutil.copy2(source, destination)
# The upstream web bundle preloads this module with a relative URL from
# /app/photocraft-web.js, which incorrectly resolves under /app/snippets.
for script in target.rglob("*.js"):
contents = script.read_text()
fixed = contents.replace(
'href:"./snippets/', 'href:"/snippets/'
)
if fixed != contents:
script.write_text(fixed)