question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@carbon/telemetry pollutes our production code with unused development dependencies and impacts load performance

See original GitHub issue

What package(s) are you using?

  • [x ] carbon-components
  • [ x] carbon-components-vue

Detailed description

With v10.27.0 @carbon/telemetry was added, and has really bad impact on our product. For our application, we are using @carbon/vue, which picked telemetry with 2.37.1.

After updating to the new version, we found

  • many new dependencies added as production dependencies in our package-lock.json
  • and a growth of our distribution package of over 200% (from 26MB to 47MB, see below)

We already tried to address that, see https://ibm-cloud.slack.com/archives/CAM5P6NR1/p1612864854039900 https://github.com/carbon-design-system/carbon-components-vue/issues/1142

but the only answer was that we can opt out by using CARBON_TELEMETRY_DISABLED. But setting CARBON_TELEMETRY_DISABLED doesn’t prevent any of the issues we have:

  1. The raised footprint of the generated chunk-vendors.js layer slows down our performance.
  2. We must ship components/code we never use, which need to be maintained and monitored for vulnerabilities, security flaws etc.
  3. We need to get open-source clearance for all these newly added packages, for components that we don’t require at all

Such a utility module must not impact the product’s code in such heavy manner.

Is this issue related to a specific component? n/a

What did you expect to happen? What happened instead? What would you like to see changed?

Expecting

  • same build behavior when doing minor version updates
  • a clean production dependency tree without unused libs/code

Happend:

  1. The raised footprint of the generated chunk-vendors.js layer slows down our performance.
  2. We must ship components/code we never use, which need to be maintained and monitored for vulnerabilities, security flaws etc.
  3. We need to get open-source clearance for all these newly added packages, for components that we don’t require at all

What needs to change:

Telemetry code running only as node installation hook during development phase must not contribute to the app’s production package. Therefore redesign telemetry copmonent to be a development package or drop it.

What browser are you working in? n/a

What version of the Carbon Design System are you using? see package.json below

What offering/product do you work on? Any pressing ship or release dates we should be aware of? IBM Digital Business Automation Cloud Portal app

Steps to reproduce the issue

1.Have an app built on carbo/vue 2.37.0 2. Check build sizes and dependency tree with node ls --prod 3. update to carbon/vue 2.37.1+ 4. repeat step 2

Please create a reduced test case in CodeSandbox n/a

Additional information

For comparison, here are some examples of our app, before and after moving to version @carbon/vue 2.38.2, and therefore before and after added telemetry. Especially check the changed size of the chunk-vendors layer: 16Mb before, 37Mb afterwards and the quite small dependencies tree before and the very large one aftrwerwards:

Before update:

$ cat package.json { β€œname”: β€œcom.ibm.automation.cloud.instance.ui.dbaoc”, β€œdependencies”: { β€œ@carbon/vue”: β€œ2.37.0”, β€œcore-js”: β€œ3.12.1”, β€œlodash”: β€œ4.17.21”, β€œvue”: β€œ2.6.12”, β€œvue-i18n”: β€œ8.24.4”, β€œvue-router”: β€œ3.5.1” }, … }

$ du -h dist 68K dist/img 604K dist/css 25M dist/js 300K dist/vendor/jquery-ui/i18n 300K dist/vendor/jquery-ui 636K dist/vendor 26M dist

$ du -ha dist/js/* 468K dist/js/admin-access-management.ec4b79d1.js 3.3M dist/js/admin-reports.8a3b9a58.js 724K dist/js/admin-system-operations.9059c77c.js 3.9M dist/js/app.283180c5.js 16M dist/js/chunk-vendors.27d0cff5.js


$ npm ls --prod
com.ibm.automation.cloud.instance.ui.dbaoc@1.0.0 
β”œβ”€β”¬ @carbon/vue@2.37.0
β”‚ β”œβ”€β”¬ @carbon/icons-vue@10.20.0
β”‚ β”‚ └── @carbon/icon-helpers@10.17.0
β”‚ β”œβ”€β”¬ carbon-components@10.23.1
β”‚ β”‚ β”œβ”€β”€ flatpickr@4.6.1
β”‚ β”‚ β”œβ”€β”€ lodash.debounce@4.0.8
β”‚ β”‚ └─┬ warning@3.0.0
β”‚ β”‚   └─┬ loose-envify@1.4.0
β”‚ β”‚     └── js-tokens@4.0.0
β”‚ β”œβ”€β”€ flatpickr@4.6.3
β”‚ └── vue@2.6.12 deduped
β”œβ”€β”€ core-js@3.12.1
β”œβ”€β”€ lodash@4.17.21
β”œβ”€β”€ vue@2.6.12
β”œβ”€β”€ vue-i18n@8.24.4
└── vue-router@3.5.1

After update (no other changes):

package.json { β€œname”: β€œcom.ibm.automation.cloud.instance.ui.dbaoc” β€œdependencies”: { β€œ@carbon/vue”: β€œ2.38.2”, β€œcore-js”: β€œ3.12.1”, β€œlodash”: β€œ4.17.21”, β€œvue”: β€œ2.6.12”, β€œvue-i18n”: β€œ8.24.4”, β€œvue-router”: β€œ3.5.1” }, … }

$ du -h dist 68K dist/img 604K dist/css 45M dist/js 300K dist/vendor/jquery-ui/i18n 300K dist/vendor/jquery-ui 636K dist/vendor 47M dist

$ du -ha dist/js/* 468K dist/js/admin-access-management.8b5d2bd7.js 3.3M dist/js/admin-reports.874e1cb5.js 724K dist/js/admin-system-operations.b017aac0.js 3.9M dist/js/app.c226d3a2.js 37M dist/js/chunk-vendors.49f119cd.js


$ npm ls --prod 
com.ibm.automation.cloud.instance.ui.dbaoc@1.0.0
β”œβ”€β”¬ @carbon/vue@2.38.2
β”‚ β”œβ”€β”¬ @carbon/icons-vue@10.27.0
β”‚ β”‚ └── @carbon/icon-helpers@10.18.0
β”‚ β”œβ”€β”¬ @carbon/telemetry@0.0.0-alpha.6
β”‚ β”‚ β”œβ”€β”€ @babel/parser@7.14.3
β”‚ β”‚ β”œβ”€β”¬ @babel/traverse@7.14.2
β”‚ β”‚ β”‚ β”œβ”€β”¬ @babel/code-frame@7.12.13
β”‚ β”‚ β”‚ β”‚ └─┬ @babel/highlight@7.14.0
β”‚ β”‚ β”‚ β”‚   β”œβ”€β”€ @babel/helper-validator-identifier@7.14.0 deduped
β”‚ β”‚ β”‚ β”‚   β”œβ”€β”¬ chalk@2.4.2
β”‚ β”‚ β”‚ β”‚   β”‚ β”œβ”€β”¬ ansi-styles@3.2.1
β”‚ β”‚ β”‚ β”‚   β”‚ β”‚ └─┬ color-convert@1.9.3
β”‚ β”‚ β”‚ β”‚   β”‚ β”‚   └── color-name@1.1.3
β”‚ β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ escape-string-regexp@1.0.5
β”‚ β”‚ β”‚ β”‚   β”‚ └─┬ supports-color@5.5.0
β”‚ β”‚ β”‚ β”‚   β”‚   └── has-flag@3.0.0
β”‚ β”‚ β”‚ β”‚   └── js-tokens@4.0.0 deduped
β”‚ β”‚ β”‚ β”œβ”€β”¬ @babel/generator@7.14.3
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ @babel/types@7.14.2 deduped
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ jsesc@2.5.2
β”‚ β”‚ β”‚ β”‚ └── source-map@0.5.7
β”‚ β”‚ β”‚ β”œβ”€β”¬ @babel/helper-function-name@7.14.2
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ @babel/helper-get-function-arity@7.12.13
β”‚ β”‚ β”‚ β”‚ β”‚ └── @babel/types@7.14.2 deduped
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ @babel/template@7.12.13
β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ @babel/code-frame@7.12.13 deduped
β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ @babel/parser@7.14.3 deduped
β”‚ β”‚ β”‚ β”‚ β”‚ └── @babel/types@7.14.2 deduped
β”‚ β”‚ β”‚ β”‚ └── @babel/types@7.14.2 deduped
β”‚ β”‚ β”‚ β”œβ”€β”¬ @babel/helper-split-export-declaration@7.12.13
β”‚ β”‚ β”‚ β”‚ └── @babel/types@7.14.2 deduped
β”‚ β”‚ β”‚ β”œβ”€β”€ @babel/parser@7.14.3 deduped
β”‚ β”‚ β”‚ β”œβ”€β”¬ @babel/types@7.14.2
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ @babel/helper-validator-identifier@7.14.0
β”‚ β”‚ β”‚ β”‚ └── to-fast-properties@2.0.0
β”‚ β”‚ β”‚ β”œβ”€β”¬ debug@4.3.1
β”‚ β”‚ β”‚ β”‚ └── ms@2.1.2
β”‚ β”‚ β”‚ └── globals@11.12.0
β”‚ β”‚ β”œβ”€β”€ ci-info@2.0.0
β”‚ β”‚ β”œβ”€β”¬ configstore@5.0.1
β”‚ β”‚ β”‚ β”œβ”€β”¬ dot-prop@5.3.0
β”‚ β”‚ β”‚ β”‚ └── is-obj@2.0.0
β”‚ β”‚ β”‚ β”œβ”€β”€ graceful-fs@4.2.6 deduped
β”‚ β”‚ β”‚ β”œβ”€β”¬ make-dir@3.1.0
β”‚ β”‚ β”‚ β”‚ └── semver@6.3.0
β”‚ β”‚ β”‚ β”œβ”€β”¬ unique-string@2.0.0
β”‚ β”‚ β”‚ β”‚ └── crypto-random-string@2.0.0
β”‚ β”‚ β”‚ β”œβ”€β”¬ write-file-atomic@3.0.3
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ imurmurhash@0.1.4
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ is-typedarray@1.0.0
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ signal-exit@3.0.3
β”‚ β”‚ β”‚ β”‚ └─┬ typedarray-to-buffer@3.1.5
β”‚ β”‚ β”‚ β”‚   └── is-typedarray@1.0.0 deduped
β”‚ β”‚ β”‚ └── xdg-basedir@4.0.0
β”‚ β”‚ β”œβ”€β”¬ fast-glob@3.2.5
β”‚ β”‚ β”‚ β”œβ”€β”€ @nodelib/fs.stat@2.0.5
β”‚ β”‚ β”‚ β”œβ”€β”¬ @nodelib/fs.walk@1.2.7
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ @nodelib/fs.scandir@2.1.5
β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ @nodelib/fs.stat@2.0.5
β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ run-parallel@1.2.0
β”‚ β”‚ β”‚ β”‚ β”‚   └── queue-microtask@1.2.3
β”‚ β”‚ β”‚ β”‚ └─┬ fastq@1.11.0
β”‚ β”‚ β”‚ β”‚   └── reusify@1.0.4
β”‚ β”‚ β”‚ β”œβ”€β”¬ glob-parent@5.1.2
β”‚ β”‚ β”‚ β”‚ └─┬ is-glob@4.0.1
β”‚ β”‚ β”‚ β”‚   └── is-extglob@2.1.1
β”‚ β”‚ β”‚ β”œβ”€β”€ merge2@1.4.1
β”‚ β”‚ β”‚ β”œβ”€β”¬ micromatch@4.0.4
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ braces@3.0.2
β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ fill-range@7.0.1
β”‚ β”‚ β”‚ β”‚ β”‚   └─┬ to-regex-range@5.0.1
β”‚ β”‚ β”‚ β”‚ β”‚     └── is-number@7.0.0
β”‚ β”‚ β”‚ β”‚ └── picomatch@2.2.3 deduped
β”‚ β”‚ β”‚ └── picomatch@2.2.3
β”‚ β”‚ β”œβ”€β”¬ fs-extra@9.1.0
β”‚ β”‚ β”‚ β”œβ”€β”€ at-least-node@1.0.0
β”‚ β”‚ β”‚ β”œβ”€β”€ graceful-fs@4.2.6
β”‚ β”‚ β”‚ β”œβ”€β”¬ jsonfile@6.1.0
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ graceful-fs@4.2.6 deduped
β”‚ β”‚ β”‚ β”‚ └── universalify@2.0.0 deduped
β”‚ β”‚ β”‚ └── universalify@2.0.0
β”‚ β”‚ β”œβ”€β”¬ got@11.8.2
β”‚ β”‚ β”‚ β”œβ”€β”€ @sindresorhus/is@4.0.1
β”‚ β”‚ β”‚ β”œβ”€β”¬ @szmarczak/http-timer@4.0.5
β”‚ β”‚ β”‚ β”‚ └── defer-to-connect@2.0.1
β”‚ β”‚ β”‚ β”œβ”€β”¬ @types/cacheable-request@6.0.1
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ @types/http-cache-semantics@4.0.0
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ @types/keyv@3.1.1
β”‚ β”‚ β”‚ β”‚ β”‚ └── @types/node@15.3.1 deduped
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ @types/node@15.3.1
β”‚ β”‚ β”‚ β”‚ └── @types/responselike@1.0.0 deduped
β”‚ β”‚ β”‚ β”œβ”€β”¬ @types/responselike@1.0.0
β”‚ β”‚ β”‚ β”‚ └── @types/node@15.3.1 deduped
β”‚ β”‚ β”‚ β”œβ”€β”€ cacheable-lookup@5.0.4
β”‚ β”‚ β”‚ β”œβ”€β”¬ cacheable-request@7.0.2
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ clone-response@1.0.2
β”‚ β”‚ β”‚ β”‚ β”‚ └── mimic-response@1.0.1
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ get-stream@5.2.0
β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ pump@3.0.0
β”‚ β”‚ β”‚ β”‚ β”‚   β”œβ”€β”¬ end-of-stream@1.4.4
β”‚ β”‚ β”‚ β”‚ β”‚   β”‚ └── once@1.4.0 deduped
β”‚ β”‚ β”‚ β”‚ β”‚   └─┬ once@1.4.0
β”‚ β”‚ β”‚ β”‚ β”‚     └── wrappy@1.0.2
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ http-cache-semantics@4.1.0
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ keyv@4.0.3
β”‚ β”‚ β”‚ β”‚ β”‚ └── json-buffer@3.0.1
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ lowercase-keys@2.0.0 deduped
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ normalize-url@6.0.1
β”‚ β”‚ β”‚ β”‚ └── responselike@2.0.0 deduped
β”‚ β”‚ β”‚ β”œβ”€β”¬ decompress-response@6.0.0
β”‚ β”‚ β”‚ β”‚ └── mimic-response@3.1.0
β”‚ β”‚ β”‚ β”œβ”€β”¬ http2-wrapper@1.0.3
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ quick-lru@5.1.1
β”‚ β”‚ β”‚ β”‚ └── resolve-alpn@1.1.2
β”‚ β”‚ β”‚ β”œβ”€β”€ lowercase-keys@2.0.0
β”‚ β”‚ β”‚ β”œβ”€β”€ p-cancelable@2.1.1
β”‚ β”‚ β”‚ └─┬ responselike@2.0.0
β”‚ β”‚ β”‚   └── lowercase-keys@2.0.0 deduped
β”‚ β”‚ β”œβ”€β”¬ semver@7.3.5
β”‚ β”‚ β”‚ └─┬ lru-cache@6.0.0
β”‚ β”‚ β”‚   └── yallist@4.0.0
β”‚ β”‚ β”œβ”€β”¬ winston@3.3.3
β”‚ β”‚ β”‚ β”œβ”€β”¬ @dabh/diagnostics@2.0.2
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ colorspace@1.1.2
β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ color@3.0.0
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ color-convert@1.9.3
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └── color-name@1.1.3
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ └─┬ color-string@1.5.5
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚   β”œβ”€β”€ color-name@1.1.4 deduped
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚   └─┬ simple-swizzle@0.2.2
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚     └── is-arrayish@0.3.2
β”‚ β”‚ β”‚ β”‚ β”‚ └── text-hex@1.0.0
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ enabled@2.0.0
β”‚ β”‚ β”‚ β”‚ └── kuler@2.0.0
β”‚ β”‚ β”‚ β”œβ”€β”€ async@3.2.0
β”‚ β”‚ β”‚ β”œβ”€β”€ is-stream@2.0.0
β”‚ β”‚ β”‚ β”œβ”€β”¬ logform@2.2.0
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ colors@1.4.0
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ fast-safe-stringify@2.0.7
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ fecha@4.2.1
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ ms@2.1.2 deduped
β”‚ β”‚ β”‚ β”‚ └── triple-beam@1.3.0 deduped
β”‚ β”‚ β”‚ β”œβ”€β”¬ one-time@1.0.0
β”‚ β”‚ β”‚ β”‚ └── fn.name@1.1.0
β”‚ β”‚ β”‚ β”œβ”€β”¬ readable-stream@3.6.0
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ inherits@2.0.4
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”¬ string_decoder@1.1.1
β”‚ β”‚ β”‚ β”‚ β”‚ └── safe-buffer@5.1.2 deduped
β”‚ β”‚ β”‚ β”‚ └── util-deprecate@1.0.2
β”‚ β”‚ β”‚ β”œβ”€β”€ stack-trace@0.0.10
β”‚ β”‚ β”‚ β”œβ”€β”€ triple-beam@1.3.0
β”‚ β”‚ β”‚ └─┬ winston-transport@4.4.0
β”‚ β”‚ β”‚   β”œβ”€β”¬ readable-stream@2.3.7
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ core-util-is@1.0.2
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ inherits@2.0.4 deduped
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ isarray@1.0.0
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ process-nextick-args@2.0.1
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ safe-buffer@5.1.2
β”‚ β”‚ β”‚   β”‚ β”œβ”€β”€ string_decoder@1.1.1 deduped
β”‚ β”‚ β”‚   β”‚ └── util-deprecate@1.0.2 deduped
β”‚ β”‚ β”‚   └── triple-beam@1.3.0 deduped
β”‚ β”‚ └─┬ yargs@16.2.0
β”‚ β”‚   β”œβ”€β”¬ cliui@7.0.4
β”‚ β”‚   β”‚ β”œβ”€β”€ string-width@4.2.2 deduped
β”‚ β”‚   β”‚ β”œβ”€β”¬ strip-ansi@6.0.0
β”‚ β”‚   β”‚ β”‚ └── ansi-regex@5.0.0
β”‚ β”‚   β”‚ └─┬ wrap-ansi@7.0.0
β”‚ β”‚   β”‚   β”œβ”€β”¬ ansi-styles@4.3.0
β”‚ β”‚   β”‚   β”‚ └─┬ color-convert@2.0.1
β”‚ β”‚   β”‚   β”‚   └── color-name@1.1.4
β”‚ β”‚   β”‚   β”œβ”€β”€ string-width@4.2.2 deduped
β”‚ β”‚   β”‚   └── strip-ansi@6.0.0 deduped
β”‚ β”‚   β”œβ”€β”€ escalade@3.1.1
β”‚ β”‚   β”œβ”€β”€ get-caller-file@2.0.5
β”‚ β”‚   β”œβ”€β”€ require-directory@2.1.1
β”‚ β”‚   β”œβ”€β”¬ string-width@4.2.2
β”‚ β”‚   β”‚ β”œβ”€β”€ emoji-regex@8.0.0
β”‚ β”‚   β”‚ β”œβ”€β”€ is-fullwidth-code-point@3.0.0
β”‚ β”‚   β”‚ └── strip-ansi@6.0.0 deduped
β”‚ β”‚   β”œβ”€β”€ y18n@5.0.8
β”‚ β”‚   └── yargs-parser@20.2.7
β”‚ β”œβ”€β”¬ carbon-components@10.30.0
β”‚ β”‚ β”œβ”€β”€ @carbon/telemetry@0.0.0-alpha.6 deduped
β”‚ β”‚ β”œβ”€β”€ flatpickr@4.6.1
β”‚ β”‚ β”œβ”€β”€ lodash.debounce@4.0.8
β”‚ β”‚ └─┬ warning@3.0.0
β”‚ β”‚   └─┬ loose-envify@1.4.0
β”‚ β”‚     └── js-tokens@4.0.0
β”‚ β”œβ”€β”€ flatpickr@4.6.9
β”‚ └── vue@2.6.12 deduped
β”œβ”€β”€ core-js@3.12.1
β”œβ”€β”€ lodash@4.17.21
β”œβ”€β”€ vue@2.6.12
β”œβ”€β”€ vue-i18n@8.24.4
└── vue-router@3.5.1

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
schuetzacommented, Jul 28, 2021

Since we didn’t get any solution or acceptance here, and we are not willing to use such a missused package tree (packaging dependencies on a web library), we started to work around this by locally overriding the telemetry package with a dummy package w/o any dependencies. However, we are happy if we can get a clean solution from carbon in the (near) future. So if you like, you can close this issue with β€˜won’t fix’ or keep it open if you think this is a valid issue.

0reactions
joshblackcommented, Sep 13, 2021

Just to reiterate what was shared above, this package is following a typical structure for a CLI package. It does not have a main, module, exports, etc. entrypoint and lists a bin entrypoint for the CLI. The dependencies listed by the package are necessary for the CLI to function.

None of the code for the CLI, or dependencies for the CLI, should be included in any bundle shipped to a user. If there is evidence of this happening, please provide steps for us to reproduce and we can investigate. It most likely is a specific bundler that is being impacted versus a general problem.

It seems that, in this case, the specific issue is that @carbon/telemetry is considered a production dependency instead of a development dependency. As a result, when installing production dependencies it will be included in a node_modules folder if you have carbon-components, carbon-components-react, etc listed under dependencies.

On our end, the only direction we can take is to list out dependencies under devDependencies and publish the package as a pre-built file that includes the dependencies. We’ll definitely investigate this path and see how feasible it is πŸ‘

I’ll go ahead and mark this as closed. If folks are running into a bundle size issue that’s being delivered to an end-user, please make an issue with steps to reproduce and we will 100% look into it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do we really need to strip packages from devDependencies in ...
To some people, performance is only about production code. To others, performance of the build system matters. Removing unused devDependencies ...
Read more >
How to Remove Unused Dependencies in React - Pluralsight
React focuses on using external dependencies for development. These dependencies are reusable react components imported as npm packages.
Read more >
Depcheck - GitHub
depcheck. Depcheck is a tool for analyzing the dependencies in a project to see: how each dependency is used, which dependencies are useless,Β ......
Read more >
Dependency Pre-Bundling - Vite
Performance : Vite converts ESM dependencies with many internal modules into a ... If an existing cache is not found, Vite will crawl...
Read more >
Application Performance Monitoring & Dependency Mapping
APM tools have agents that sit across entire production application ecosystems to monitor performance, runtime, and behavior of application code ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found