Skip to content

Conversation

denisx
Copy link

@denisx denisx commented Dec 6, 2024

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

@BruceMacD
Copy link
Collaborator

Hi @denisx, thanks for opening the PR. I believe the package can't be marked as "sideEffects": false because we import whatwg-fetch, which is a polyfill that modifies the global scope. I do plan on trying to remove this side-effect though, so leaving this PR open for now.

@denisx
Copy link
Author

denisx commented Dec 10, 2024

we can mark important (side) imports with sideEffects: ["x", "y", "..."]

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