Skip to content

fix: only optimize nested cjs dependencies #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 5, 2021

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Sep 5, 2021

Fixes #162

This would prevent bin-only packages, types-only packages, and esm packages from pre-bundling. Essentially avoiding the issues noted at #162 (comment)

Also thanks to @dominikg that led to this idea!

@bluwy bluwy requested a review from dominikg September 5, 2021 14:29
@bluwy bluwy requested a review from benmccann September 5, 2021 14:51
Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

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

I mainly just reviewed the one line with the heuristic (pkg.main && !pkg.module && !pkg.exports), but that seems like a perfectly fine idea to me

@bluwy bluwy merged commit ead758f into main Sep 5, 2021
@bluwy bluwy deleted the fix/safer-nested-optimization branch September 5, 2021 15:24
@github-actions github-actions bot mentioned this pull request Sep 5, 2021
@github-actions github-actions bot mentioned this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve handling for hybrid svelte packages in automatic dependency optimization
3 participants