Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

refactor(config): rename default staticDir to public #284

Merged
merged 4 commits into from
Jun 30, 2021

Conversation

danielroe
Copy link
Member

Note: resolving staticDir in Nitro in relation to rootDir as a unrelated static dir bug.

@pi0 Do you know if static is hard-coded in Vercel's FS API?

export const vercel: NitroPreset = extendPreset(node, {
entry: '{{ _internal.runtimeDir }}/entries/vercel',
output: {
dir: '{{ _nuxt.rootDir }}/.vercel_build_output',
serverDir: '{{ output.dir }}/functions/node/server',
publicDir: '{{ output.dir }}/static'
},
ignore: [
'vercel.json'
],
hooks: {
async 'nitro:compiled' (ctx: NitroContext) {
await writeRoutes(ctx)
}
}
})

resolves nuxt/nuxt#10971

@danielroe danielroe self-assigned this Jun 29, 2021
@pi0
Copy link
Member

pi0 commented Jun 29, 2021

@danielroe Re vercel, yes as far as remember but since unrelated we can try with public to see if they also detect public for more consistently...

@pi0 pi0 merged commit 04c3f65 into main Jun 30, 2021
@pi0 pi0 deleted the refactor/static-public branch June 30, 2021 10:29
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename static/ to public/ dir
2 participants