fix(nitro): handle esm imports from cjs files

fixes fs mock for vue-server-renderer
This commit is contained in:
Pooya Parsa 2021-04-28 16:16:23 +02:00
parent 83e28a71ac
commit 51538bfcb1

View File

@ -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