Skip to content

Commit

Permalink
Add "sideEffects": false to all internal package.json files in `@…
Browse files Browse the repository at this point in the history
…emotion/react` (#2112)
  • Loading branch information
Andarist committed Nov 17, 2020
1 parent 781173f commit fdd46bd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fifty-actors-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@emotion/react': patch
---

Fixed the latest tree-shakeability improvements by adding `"sideEffects": false` to all internal `package.json` files as well. This fixes [`hoist-non-react-statics`](https://github.com/mridgway/hoist-non-react-statics) not being dropped correctly despite of the latest improvements.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"./dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.cjs.js": "./dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.cjs.js",
"./dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.esm.js": "./dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js"
},
"sideEffects": false,
"preconstruct": {
"umdName": "emotionHoistNonReactStatics"
}
Expand Down
1 change: 1 addition & 0 deletions packages/react/jsx-dev-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"./dist/emotion-react-jsx-dev-runtime.esm.js": "./dist/emotion-react-jsx-dev-runtime.browser.esm.js"
},
"types": "../types/jsx-dev-runtime",
"sideEffects": false,
"preconstruct": {
"umdName": "emotionReactJSXDevRuntime"
}
Expand Down
1 change: 1 addition & 0 deletions packages/react/jsx-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"./dist/emotion-react-jsx-runtime.esm.js": "./dist/emotion-react-jsx-runtime.browser.esm.js"
},
"types": "../types/jsx-runtime",
"sideEffects": false,
"preconstruct": {
"umdName": "emotionReactJSXRuntime"
}
Expand Down

0 comments on commit fdd46bd

Please sign in to comment.