From 51538bfcb1a77c85fb754ff30231fb0f9cfd4749 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 28 Apr 2021 16:16:23 +0200 Subject: [PATCH] fix(nitro): handle esm imports from cjs files fixes fs mock for vue-server-renderer --- packages/nitro/src/rollup/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nitro/src/rollup/config.ts b/packages/nitro/src/rollup/config.ts index 755b8e8b7b..e34dca77d7 100644 --- a/packages/nitro/src/rollup/config.ts +++ b/packages/nitro/src/rollup/config.ts @@ -250,7 +250,7 @@ export const getRollupConfig = (nitroContext: NitroContext) => { // https://github.com/rollup/plugins/tree/master/packages/commonjs rollupConfig.plugins.push(commonjs({ - extensions: extensions.filter(ext => ext !== '.json') + requireReturnsDefault: true })) // https://github.com/rollup/plugins/tree/master/packages/json