Skip to content

Commit

Permalink
fix: support nitro dir as priority instead of publicDir
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Oct 29, 2024
1 parent e43a2ec commit f21dfa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ export function addBuildHooks(nuxt: Nuxt, hub: HubConfig) {
vectorize: hub.vectorize,
bindings: hub.bindings
}
await writeFile(join(nitro.options.output.publicDir, 'hub.config.json'), JSON.stringify(hubConfig, null, 2), 'utf-8')
const distDir = nitro.options.output.dir || nitro.options.output.publicDir
await writeFile(join(distDir, 'hub.config.json'), JSON.stringify(hubConfig, null, 2), 'utf-8')

if (hub.database) {
try {
Expand Down

0 comments on commit f21dfa1

Please sign in to comment.