From 1df4e16962fdddf0282c14ad5d85444c6fed99ab Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Sun, 4 Oct 2020 16:10:15 -0700 Subject: [PATCH] filter a default export from cjs named exports --- .../src/rollup-plugins/rollup-plugin-wrap-install-targets.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esinstall/src/rollup-plugins/rollup-plugin-wrap-install-targets.ts b/esinstall/src/rollup-plugins/rollup-plugin-wrap-install-targets.ts index 48caa3e065..07cc5b7231 100644 --- a/esinstall/src/rollup-plugins/rollup-plugin-wrap-install-targets.ts +++ b/esinstall/src/rollup-plugins/rollup-plugin-wrap-install-targets.ts @@ -60,7 +60,7 @@ export function rollupPluginWrapInstallTargets( const {exports} = parse(fileContents); // TODO: Also follow & deeply parse dependency "reexports" returned by the lexer. if (exports.length > 0) { - return exports; + return exports.filter((imp) => imp !== 'default'); } } catch (err) { // Safe to ignore, this is usually due to the file not being CJS.