mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(nitro): generate netlify _redirects
in public (#298)
This commit is contained in:
parent
b1948b1921
commit
1126255835
@ -12,7 +12,7 @@ export const netlify: NitroPreset = extendPreset(lambda, {
|
||||
},
|
||||
hooks: {
|
||||
async 'nitro:compiled' (ctx: NitroContext) {
|
||||
const redirectsPath = join(ctx._nuxt.rootDir, '_redirects')
|
||||
const redirectsPath = join(ctx.output.publicDir, '_redirects')
|
||||
let contents = '/* /.netlify/functions/server 200'
|
||||
if (existsSync(redirectsPath)) {
|
||||
const currentRedirects = await readFile(redirectsPath, 'utf-8')
|
||||
|
Loading…
Reference in New Issue
Block a user