Skip to content

Commit

Permalink
filter a default export from cjs named exports
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Oct 4, 2020
1 parent 09ec6b5 commit 1df4e16
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

1 comment on commit 1df4e16

@vercel
Copy link

@vercel vercel bot commented on 1df4e16 Oct 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.