diff --git a/build/zip-examples.mjs b/build/zip-examples.mjs
index 03995efd53..6b2e1e0dac 100644
--- a/build/zip-examples.mjs
+++ b/build/zip-examples.mjs
@@ -11,6 +11,7 @@ import fs from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import sh from 'shelljs'
+import { format } from 'prettier'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
@@ -83,7 +84,9 @@ for (const file of staticJsFiles) {
sh.rm(`${distFolder}/index.html`)
// get all examples' HTML files
-for (const file of sh.find(`${distFolder}/**/*.html`)) {
+const htmlFiles = sh.find(`${distFolder}/**/*.html`)
+
+const formatPromises = htmlFiles.map(async file => {
const fileContents = sh.cat(file)
.toString()
.replace(new RegExp(`"/docs/${versionShort}/`, 'g'), '"../')
@@ -91,8 +94,24 @@ for (const file of sh.find(`${distFolder}/**/*.html`)) {
.replace(/(]*) integrity="[^"]*"/g, '$1')
.replace(/]*href="\.\.\/assets\/img\/favicons\/[^"]*"[^>]*>/g, '')
.replace(/(