fix(nitro): import externals as esm namespace (#394)

[workaround]
This commit is contained in:
Daniel Roe 2021-07-28 08:58:07 +01:00 committed by GitHub
parent f028719e7a
commit c9ed8bc341
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -274,6 +274,7 @@ export const getRollupConfig = (nitroContext: NitroContext) => {
// https://github.com/rollup/plugins/tree/master/packages/commonjs
rollupConfig.plugins.push(commonjs({
esmExternals: id => !id.startsWith('unenv/'),
requireReturnsDefault: 'auto'
}))