Files
afilmory/apps/ssr/scripts/build.sh
Innei 2df511bff7 fix!: remove webp transformer
- Introduced a migration system for manifest files to support versioning and backward compatibility.
- Updated image processing to switch thumbnail format from WebP to JPEG for better compatibility.
- Added new commands for manifest migration and improved thumbnail handling in the builder.
- Enhanced documentation with architecture details and development commands.

Signed-off-by: Innei <tukon479@gmail.com>
2025-09-13 23:11:00 +08:00

19 lines
461 B
Bash

#!/bin/bash
set -e
cd ../web
pnpm build
rm -rf ../ssr/public
cp -r dist ../ssr/public
cd ../ssr
# Convert HTML to JS format with exported string
node -e "
const fs = require('fs');
const html = fs.readFileSync('./public/index.html', 'utf8');
const jsContent = \`export default \\\`\${html.replace(/\`/g, '\\\\\`').replace(/\\\$/g, '\\\\\$')}\\\`;\`;
fs.writeFileSync('./src/index.html.ts', jsContent);
"
rm ./public/index.html
# pnpm build:jpg
pnpm build:next