Fix PhotoCraft snippet preload path
This commit is contained in:
1 parent
2273fdfb37
commit
ece4e8f8de
1 file changed
+9
@@ -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(
|
||||
'"./snippets/', '"/snippets/'
|
||||
)
|
||||
if fixed != contents:
|
||||
script.write_text(fixed)
|
||||
Reference in new issue
Block a user