Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add sideEffects to package.json#242

Open
denisx wants to merge 1 commit intoJSONPath-Plus:main from
denisx:patch-1
Open

Add sideEffects to package.json #242
denisx wants to merge 1 commit intoJSONPath-Plus:main from
denisx:patch-1

Conversation

@denisx
Copy link

@denisx denisx commented Oct 9, 2025

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

ESM is how files and imports are organized, Side effects is how a bundler can remove obviously unused data from an assembly. Only both make maximum effect.

rollup https://rollupjs.org/configuration-options/#treeshake-modulesideeffects
webpack https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free
esbuild https://esbuild.github.io/plugins/#on-resolve-arguments

Even update not make effect yet, but make package modern, wellth and ready to future

80avin reacted with eyes emoji
Copy link

Would love to see this as well

denisx reacted with rocket emoji

Copy link
Collaborator

80avin commented Nov 15, 2025
edited
Loading

@denisx Did you see any size reduction after tree shaking after adding this property?
It looks like a harmless addition to me, but I am unsure if it will reduce anything.

Copy link
Author

denisx commented Nov 22, 2025

@80avin Update not make effect yet, but make package modern, wellth and ready to future deps updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /