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

feat: mark scripts in libraries as being side effect free by default #12372

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented Jun 19, 2024

We should encourage good practices by default. This makes a huge difference when I applied it to site-kit

Also removed "-" from "side-effects": https://english.stackexchange.com/questions/364613/side-effects-or-side-effects

Copy link

changeset-bot bot commented Jun 19, 2024

🦋 Changeset detected

Latest commit: 031861e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-svelte Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@eltigerchino
Copy link
Member

eltigerchino commented Jun 30, 2024

Just curious (I'm not knowledgeable enough to review this), what was the huge difference?

@benmccann
Copy link
Member Author

It lets Vite / Rollup do better tree shaking, so results in smaller output.

@eltigerchino eltigerchino merged commit 92301c5 into main Oct 10, 2024
12 of 13 checks passed
@eltigerchino eltigerchino deleted the side-effect-template branch October 10, 2024 04:56
@github-actions github-actions bot mentioned this pull request Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation pkg:create-svelte
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants