Skip to content
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

Mark package as side-effect free #2904

Merged
merged 1 commit into from
Mar 10, 2024

Conversation

htunnicliff
Copy link
Contributor

@htunnicliff htunnicliff commented Feb 27, 2024

Hi folks – thanks for making a delightful library!

This is a super small change that adds a sideEffects field in package.json set to false.

I'm not an expert on this field, but it looks like tools such as Bundlephobia will look for it before performing things like exports analysis: https://bundlephobia.com/package/swr@2.2.5.

It looks like Vercel's own Conformance project has some documentation on this field, for reference: https://vercel.com/docs/workflow-collaboration/conformance/rules/PACKAGE_JSON_SIDE_EFFECTS_REQUIRED

Thanks again!

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Member

@shuding shuding left a comment

Choose a reason for hiding this comment

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

Sounds good to me! CC @huozhi @promer94 any concerns?

@huozhi huozhi merged commit 7bb1dae into vercel:main Mar 10, 2024
7 checks passed
@huozhi huozhi added this to the v3 milestone Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants