mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(browser): 400.html ~> 404.html
This commit is contained in:
parent
4f74119739
commit
2e329d0403
@ -30,9 +30,9 @@ if ('serviceWorker' in navigator) {
|
||||
},
|
||||
async done ({ rootDir, publicDir }) {
|
||||
const fallback200 = resolve(publicDir, '200.html')
|
||||
const fallback400 = resolve(publicDir, '400.html')
|
||||
if (!existsSync(fallback400) && existsSync(fallback200)) {
|
||||
await copy(fallback200, fallback400)
|
||||
const fallback404 = resolve(publicDir, '404.html')
|
||||
if (!existsSync(fallback404) && existsSync(fallback200)) {
|
||||
await copy(fallback200, fallback404)
|
||||
}
|
||||
consola.info(`Try with \`nuxt start ${relative(process.cwd(), rootDir)}\``)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user