mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
don't overwrite if 200.html already exists
This commit is contained in:
parent
866e31d1a6
commit
81fcc70eca
@ -73,6 +73,13 @@ export default class Generator extends Tapable {
|
||||
}))
|
||||
}
|
||||
|
||||
// Copy /index.html to /200.html for surge SPA
|
||||
// https://surge.sh/help/adding-a-200-page-for-client-side-routing
|
||||
const _200Path = join(this.distPath, '200.html')
|
||||
if (!existsSync(_200Path)) {
|
||||
await copy(join(this.distPath, 'index.html'), _200Path)
|
||||
}
|
||||
|
||||
const duration = Math.round((Date.now() - s) / 100) / 10
|
||||
debug(`HTML Files generated in ${duration}s`)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user