chore: make cloudflare 404s happy
This commit is contained in:
parent
78953dd4c2
commit
e45261bb31
5 changed files with 18 additions and 18 deletions
|
@ -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)
|
||||
})
|
||||
}
|
Reference in a new issue