Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxt): set esmExternals and requireReturnsDefault on commonjs()
Browse files Browse the repository at this point in the history
- avoid possible side-effect due to nitro rollup commonjs plugin being overriden by setting back the default nitro data
  • Loading branch information
jhuang@hsk-partners.com committed May 3, 2022
1 parent 89e48b3 commit 905b3b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/nuxt/src/core/nitro.ts
Expand Up @@ -142,7 +142,9 @@ export async function initNitro (nuxt: Nuxt) {
'./node_modules/@vue/compiler-ssr',
'./node_modules/@vue/devtools-api',
'./node_modules/vue/server-renderer'
]
],
esmExternals: id => !id.startsWith('unenv/'),
requireReturnsDefault: 'auto'
}))
}
})
Expand Down

0 comments on commit 905b3b6

Please sign in to comment.