diff --git a/packages/nitro/src/runtime/app/nitro.client.js b/packages/nitro/src/runtime/app/nitro.client.mjs similarity index 100% rename from packages/nitro/src/runtime/app/nitro.client.js rename to packages/nitro/src/runtime/app/nitro.client.mjs diff --git a/packages/nuxt3/src/nitro.ts b/packages/nuxt3/src/nitro.ts index cdb98ba4a9..a93c9ba0c8 100644 --- a/packages/nuxt3/src/nitro.ts +++ b/packages/nuxt3/src/nitro.ts @@ -22,7 +22,7 @@ export function initNitro (nuxt: Nuxt) { // Add nitro client plugin (to inject $fetch helper) 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