-
Notifications
You must be signed in to change notification settings - Fork 341
Open
Description
Analysis of the project's dependency tree revealed several unused packages, redundant dev-dependencies across workspace packages, and opportunities for performance optimization. Cleaning these up will reduce the node_modules size (currently ~1.5GB), improve installation times, and lighten the final build artifacts.
Findings
The following packages are listed in package.json but are not imported or used in the source code:
- Root: esbuild
- @embeddedchat/react: schedule, identity-obj-proxy, jest, babel-jest
- @embeddedchat/ui-elements: schedule, identity-obj-proxy, jest, babel-jest, @rocket.chat/icons
- @embeddedchat/ui-kit: schedule, identity-obj-proxy, jest, babel-jest, color
- @embeddedchat/markups: schedule, identity-obj-proxy, jest, babel-jest
- @embeddedchat/api: rollup-plugin-serve
Redundant Dependencies (Hoisting)
The following packages are duplicated across multiple workspace packages. Hoisting them to the root package.json will optimize the dependency tree:
- @rollup/plugin-json (4 packages)
- @emotion/babel-preset-css-prop (4 packages)
- @emotion/react (4 packages)
- normalize.css (3 packages)
- prop-types (4 packages)
- rollup-plugin-analyzer (3 packages)
- rollup-plugin-terser (3 packages)
Build Tooling Inconsistencies
- Unused Dev Tools: concurrently, npm-run-all, and deepmerge appear in
devDependenciesbut are not utilized in scripts or source. - Rollup Versions: Inconsistent versions across packages (
^2.70.1vs^3.23.0).
Proposed Changes
- Remove unused packages by pruning the relevant
package.jsonfiles in each workspace. - Hoist common devDependencies to the root level.
- Standardize versions of Rollup and other build-related plugins across the monorepo.
Expected Impact
- Reduced
node_modulesfootprint. - Faster CI/CD pipelines due to lower installation overhead.
- Cleaner dependency graph and easier long-term maintenance.
Additional Context
Analysis was performed via static code search and dependency usage metrics. The current node_modules size is approximately 1.5GB.
Metadata
Metadata
Assignees
Labels
No labels