Skip to content

Conversation

@denisx
Copy link
Contributor

@denisx denisx commented Dec 6, 2024

Add side effects to package.json to help bundlers cut unused code. Good with named imports.

@WebReflection
Copy link
Member

WebReflection commented Dec 6, 2024

I am not sure about this one ... I don't mind adding that extra flags but the underlying issue seems to be bundlers incapable of tree-shaking? 🤔

Or better: what scenario are we trying to solve in here?

@denisx
Copy link
Contributor Author

denisx commented Dec 6, 2024

Package allready has "type": "module". sideEffects just a full settings for bundlers.
For example, if i use named '{serialize} from index', bundler can cut other exports from client bundle.

@WebReflection
Copy link
Member

@denisx again, that's what my bundler of choice (rollup) does already for me ... what is this change trying to solve? which bundler is incapable of proper tree-shaking and requires this change? 🤔

@denisx
Copy link
Contributor Author

denisx commented Dec 6, 2024

@WebReflection WebReflection merged commit 0f1cdbd into ungap:main Dec 6, 2024
2 checks passed
@denisx denisx deleted the patch-1 branch December 6, 2024 18:45
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.

2 participants