chore: make cloudflare 404s happy

This commit is contained in:
Cory Dransfeldt 2024-07-16 09:30:21 -07:00
parent 78953dd4c2
commit e45261bb31
No known key found for this signature in database
5 changed files with 18 additions and 18 deletions

View file

@ -1,4 +1,5 @@
import fs from 'fs'
import path from 'path'
import { minify } from 'terser'
export const minifyJsComponents = async () => {
@ -14,3 +15,12 @@ export const minifyJsComponents = async () => {
}
}
}
export const copy404Page = () => {
const sourcePath = path.join('_site', '404', 'index.html')
const destinationPath = path.join('_site', '404.html')
fs.copyFile(sourcePath, destinationPath, (err) => {
if (err) console.error('Error copying 404 page:', err)
})
}