fix: use unshift on publicAssets (#885)

This commit is contained in:
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

View file

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