Skip to content

Commit

Permalink
chore: add sideEffects to package.json (#545)
Browse files Browse the repository at this point in the history
# Motivation

I compared our setup with a sample Svelte app and noticed that the
`package.json` contained a `sideEffects` field. While we do not
necesseraly needs it, according
[documentation](https://svelte.dev/docs/kit/packaging#Anatomy-of-a-package.json-sideEffects),
it's advised to add it.

# Changes

- Specify a `sideEffect` for `css` in `package.json` to help bundlers
tree shake those files when the lib is consumed.
  • Loading branch information
peterpeterparker authored Dec 9, 2024
1 parent e8aed6d commit ff6d3b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"e2e:report": "npx playwright show-report",
"copy:workers": "node ./scripts/copy-workers.mjs"
},
"sideEffects": [
"**/*.css"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit ff6d3b0

Please sign in to comment.