From 810e8201187bdb1c3066e26d042a2edd8d67154b Mon Sep 17 00:00:00 2001 From: Marco Liberati Date: Wed, 8 May 2024 11:43:32 +0200 Subject: [PATCH] Fix treeshake on shared-ux packages (#182790) ## Summary This PR should fix some regression due to some previous tree-shake configs from #182348 . The fix tells now webpack to always import css, so final bundle size will increase back again (not all of it, but a good 70%). --- packages/shared-ux/avatar/solution/package.json | 2 +- packages/shared-ux/button/exit_full_screen/package.json | 2 +- packages/shared-ux/chrome/navigation/package.json | 2 +- packages/shared-ux/file/file_picker/impl/package.json | 2 +- packages/shared-ux/page/solution_nav/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/shared-ux/avatar/solution/package.json b/packages/shared-ux/avatar/solution/package.json index 84cd3fb6e597d..7ebb65ba7cd32 100644 --- a/packages/shared-ux/avatar/solution/package.json +++ b/packages/shared-ux/avatar/solution/package.json @@ -3,5 +3,5 @@ "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "sideEffects": false + "sideEffects": ["*.scss"] } \ No newline at end of file diff --git a/packages/shared-ux/button/exit_full_screen/package.json b/packages/shared-ux/button/exit_full_screen/package.json index 0cbd7067a2465..338264b5ecbf5 100644 --- a/packages/shared-ux/button/exit_full_screen/package.json +++ b/packages/shared-ux/button/exit_full_screen/package.json @@ -3,5 +3,5 @@ "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "sideEffects": false + "sideEffects": ["*.scss"] } \ No newline at end of file diff --git a/packages/shared-ux/chrome/navigation/package.json b/packages/shared-ux/chrome/navigation/package.json index 3409c5e815049..74a4a5b42a923 100644 --- a/packages/shared-ux/chrome/navigation/package.json +++ b/packages/shared-ux/chrome/navigation/package.json @@ -3,5 +3,5 @@ "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "sideEffects": false + "sideEffects": ["*.scss"] } \ No newline at end of file diff --git a/packages/shared-ux/file/file_picker/impl/package.json b/packages/shared-ux/file/file_picker/impl/package.json index b2e7d0fb87403..1f6ae6648a081 100644 --- a/packages/shared-ux/file/file_picker/impl/package.json +++ b/packages/shared-ux/file/file_picker/impl/package.json @@ -3,5 +3,5 @@ "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "sideEffects": false + "sideEffects": ["*.scss"] } diff --git a/packages/shared-ux/page/solution_nav/package.json b/packages/shared-ux/page/solution_nav/package.json index f133dbd40daab..53a5979da78b1 100644 --- a/packages/shared-ux/page/solution_nav/package.json +++ b/packages/shared-ux/page/solution_nav/package.json @@ -3,5 +3,5 @@ "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "sideEffects": false + "sideEffects": ["*.scss"] } \ No newline at end of file