From 71e0ab7dc5d622872125ef0986c09e495f9df554 Mon Sep 17 00:00:00 2001 From: Mac Lockard Date: Thu, 21 Nov 2019 12:45:03 -0800 Subject: [PATCH] Declared package side effects free This sets the package.json field sideEffects to false. This allows for better tree shaking by downstream consumers, see https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free for more information. I skimmed over all included files and I did not see anything that would count following webpack's definition of tree shaking during a production build. There is one side effect, but I believe its only used in development builds, so it would be okay to tree shake: https://github.com/bvaughn/react-window/blob/master/src/createListComponent.js#L127-L136 For more details on how this field works and why it matter see the discussion here: https://github.com/react-dnd/react-dnd/pull/1577 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 894e330a..5efe5e31 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "files": ["dist", "src/*.js"], + "sideEffects": false, "scripts": { "flow": "flow check --max-warnings=0 src && flow check website", "precommit": "lint-staged",