mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix: add temp fix for browser
This commit is contained in:
parent
abf65f2176
commit
37c7e892d5
@ -32,7 +32,13 @@ if ('serviceWorker' in navigator) {
|
|||||||
tmpl.compiled = tmpl.compiled.replace('</body>', script + '</body>')
|
tmpl.compiled = tmpl.compiled.replace('</body>', script + '</body>')
|
||||||
},
|
},
|
||||||
async 'sigma:compiled' ({ output }: SigmaContext) {
|
async 'sigma:compiled' ({ output }: SigmaContext) {
|
||||||
await writeFile(resolve(output.publicDir, 'sw.js'), 'self.importScripts(\'/server/index.js\');')
|
await writeFile(resolve(output.publicDir, 'sw.js'), 'self.importScripts(\'/_server/index.js\');')
|
||||||
|
|
||||||
|
// Temp fix
|
||||||
|
await writeFile(resolve(output.publicDir, 'index.html'), script)
|
||||||
|
await writeFile(resolve(output.publicDir, '200.html'), script)
|
||||||
|
await writeFile(resolve(output.publicDir, '404.html'), script)
|
||||||
|
|
||||||
consola.info('Ready to deploy to static hosting:', prettyPath(output.publicDir as string))
|
consola.info('Ready to deploy to static hosting:', prettyPath(output.publicDir as string))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user