Skip to content

Commit 5120700

Browse files
committedDec 19, 2022
fix: add side-effect: false
this might not help much, but by adding side-effect: false to a module, we are telling webpack that it can do more splitting and tree shaking optimizations https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free
1 parent bb5b057 commit 5120700

File tree

19 files changed

+76
-0
lines changed

19 files changed

+76
-0
lines changed
 

‎packages/core/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"typedocMain": "src/index.ts",
2828
"module": "mdist/index.js",
2929
"types": "mdist/index.d.ts",
30+
"sideEffects": [
31+
"*.css",
32+
"*.scss"
33+
],
3034
"bin": {
3135
"kui": "bin/kui"
3236
},

‎packages/react/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"typedocMain": "src/index.ts",
1212
"module": "mdist/index.js",
1313
"types": "mdist/index.d.ts",
14+
"sideEffects": [
15+
"*.css",
16+
"*.scss"
17+
],
1418
"repository": {
1519
"type": "git",
1620
"url": "git+https://github.com/IBM/kui.git"

‎plugins/plugin-bash-like/fs/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
"main": "dist/index.js",
2323
"module": "mdist/index.js",
2424
"types": "mdist/index.d.ts",
25+
"sideEffects": [
26+
"*.css",
27+
"*.scss"
28+
],
2529
"publishConfig": {
2630
"access": "private"
2731
}

‎plugins/plugin-bash-like/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"typedocMain": "src/index.ts",
2424
"module": "mdist/index.js",
2525
"types": "mdist/index.d.ts",
26+
"sideEffects": [
27+
"*.css",
28+
"*.scss"
29+
],
2630
"dependencies": {
2731
"@kui-shell/xterm-helpers": "2.0.0",
2832
"cookie": "0.5.0",

‎plugins/plugin-carbon-themes/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"main": "dist/index.js",
2424
"module": "mdist/index.js",
2525
"types": "mdist/index.d.ts",
26+
"sideEffects": [
27+
"*.css",
28+
"*.scss"
29+
],
2630
"publishConfig": {
2731
"access": "public"
2832
},

‎plugins/plugin-client-common/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
"typedocMain": "src/index.ts",
2121
"module": "mdist/index.js",
2222
"types": "mdist/index.d.ts",
23+
"sideEffects": [
24+
"*.css",
25+
"*.scss"
26+
],
2327
"dependencies": {
2428
"@fortawesome/fontawesome-free": "6.2.1",
2529
"@mdi/font": "7.1.96",

‎plugins/plugin-client-default/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
"typedocMain": "src/index.ts",
77
"module": "mdist/index.js",
88
"types": "mdist/index.d.ts",
9+
"sideEffects": [
10+
"*.css",
11+
"*.scss"
12+
],
913
"license": "Apache-2.0",
1014
"author": "Mengting Yan",
1115
"homepage": "https://github.com/IBM/kui#readme",

‎plugins/plugin-core-support/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"typedocMain": "src/index.ts",
2424
"module": "mdist/index.js",
2525
"types": "mdist/index.d.ts",
26+
"sideEffects": [
27+
"*.css",
28+
"*.scss"
29+
],
2630
"dependencies": {
2731
"@electron/remote": "2.0.9",
2832
"@supercharge/promise-pool": "2.3.2",

‎plugins/plugin-core-themes/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"main": "dist/index.js",
2424
"module": "mdist/index.js",
2525
"types": "mdist/index.d.ts",
26+
"sideEffects": [
27+
"*.css",
28+
"*.scss"
29+
],
2630
"publishConfig": {
2731
"access": "public"
2832
},

‎plugins/plugin-electron-components/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
"typedocMain": "src/index.ts",
2121
"module": "mdist/index.js",
2222
"types": "mdist/index.d.ts",
23+
"sideEffects": [
24+
"*.css",
25+
"*.scss"
26+
],
2327
"dependencies": {
2428
"@electron/remote": "2.0.9",
2529
"@patternfly/react-core": "^4.264.0",

‎plugins/plugin-git/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"typedocMain": "src/index.ts",
2424
"module": "mdist/index.js",
2525
"types": "mdist/index.d.ts",
26+
"sideEffects": [
27+
"*.css",
28+
"*.scss"
29+
],
2630
"publishConfig": {
2731
"access": "public"
2832
},

‎plugins/plugin-kubectl-tray-menu/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"typedocMain": "src/index.ts",
2626
"module": "mdist/index.js",
2727
"types": "mdist/index.d.ts",
28+
"sideEffects": [
29+
"*.css",
30+
"*.scss"
31+
],
2832
"dependencies": {
2933
"debug": "4.3.4"
3034
},

‎plugins/plugin-kubectl/helm/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"main": "dist/index.js",
2828
"module": "mdist/index.js",
2929
"types": "mdist/index.d.ts",
30+
"sideEffects": [
31+
"*.css",
32+
"*.scss"
33+
],
3034
"dependencies": {
3135
"@kui-shell/core": "8.0.6",
3236
"@IBM/kui": "*",

‎plugins/plugin-kubectl/logs/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
"main": "dist/index.js",
2727
"module": "mdist/index.js",
2828
"types": "mdist/index.d.ts",
29+
"sideEffects": [
30+
"*.css",
31+
"*.scss"
32+
],
2933
"dependencies": {},
3034
"krew": {
3135
"commandPrefix": "kubeui"

‎plugins/plugin-kubectl/oc/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"main": "dist/index.js",
2929
"module": "mdist/index.js",
3030
"types": "mdist/index.d.ts",
31+
"sideEffects": [
32+
"*.css",
33+
"*.scss"
34+
],
3135
"dependencies": {
3236
"@kui-shell/plugin-kubectl": "*"
3337
},

‎plugins/plugin-kubectl/odo/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"main": "dist/index.js",
2929
"module": "mdist/index.js",
3030
"types": "mdist/index.d.ts",
31+
"sideEffects": [
32+
"*.css",
33+
"*.scss"
34+
],
3135
"dependencies": {
3236
"@kui-shell/plugin-kubectl": "*"
3337
},

‎plugins/plugin-kubectl/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"typedocMain": "src/index.ts",
2828
"module": "mdist/index.js",
2929
"types": "mdist/index.d.ts",
30+
"sideEffects": [
31+
"*.css",
32+
"*.scss"
33+
],
3034
"dependencies": {
3135
"@kui-shell/jsonpath": "1.1.1",
3236
"bytes-iec": "3.1.1",

‎plugins/plugin-patternfly4-themes/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
"main": "dist/index.js",
2424
"module": "mdist/index.js",
2525
"types": "mdist/index.d.ts",
26+
"sideEffects": [
27+
"*.css",
28+
"*.scss"
29+
],
2630
"publishConfig": {
2731
"access": "public"
2832
},

‎plugins/plugin-s3/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"typedocMain": "src/index.ts",
2929
"module": "mdist/index.js",
3030
"types": "mdist/index.d.ts",
31+
"sideEffects": [
32+
"*.css",
33+
"*.scss"
34+
],
3135
"dependencies": {
3236
"@patternfly/react-table": "^4.111.45",
3337
"common-path-prefix": "3.0.0",

0 commit comments

Comments
 (0)
Please sign in to comment.