fix: use nitro plugin with explicit mjs extension

This commit is contained in:
Pooya Parsa 2021-06-18 14:34:07 +02:00
parent 3398d5a7d6
commit 1ed3387243
2 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ export function initNitro (nuxt: Nuxt) {
// Add nitro client plugin (to inject $fetch helper) // Add nitro client plugin (to inject $fetch helper)
nuxt.hook('app:resolve', (app) => { nuxt.hook('app:resolve', (app) => {
app.plugins.push({ src: '@nuxt/nitro/dist/runtime/app/nitro.client' }) app.plugins.push({ src: require.resolve('@nuxt/nitro/dist/runtime/app/nitro.client.mjs') })
}) })
// Expose process.env.NITRO_PRESET // Expose process.env.NITRO_PRESET