fix: use `unshift` on `publicAssets` (#885)

zio/stable
Joaquín Sánchez 2023-01-08 21:23:04 +01:00 committed by GitHub
parent 7e191d7296
commit 3c90fee07e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -25,9 +25,9 @@ export default defineNuxtModule({
nuxt.hook('nitro:config', (config) => { nuxt.hook('nitro:config', (config) => {
config.publicAssets = config.publicAssets || [] config.publicAssets = config.publicAssets || []
if (env === 'dev') if (env === 'dev')
config.publicAssets.push({ dir: resolve('../public-dev') }) config.publicAssets.unshift({ dir: resolve('../public-dev') })
else if (env === 'canary' || env === 'preview' || !isCI) else if (env === 'canary' || env === 'preview' || !isCI)
config.publicAssets.push({ dir: resolve('../public-staging') }) config.publicAssets.unshift({ dir: resolve('../public-staging') })
}) })
}, },
}) })