Repository navigation
chore(deps): remove unused npm packages and Angular modules - #159
Merged
Merged
Conversation
Drop every dependency that is not referenced by the application code, templates or build configuration: - UI widgets: @angular/cdk, @angular/material, @ctrl/ngx-emoji-mart, @ng-select/ng-select, simplebar-angular, angular-feather, angular-ng-autocomplete, angular-ng-stepper - charts: chart.js, echarts, ng2-charts, ngx-echarts, @types/echarts - forms and inputs: angularx-flatpickr, flatpickr, ng-otp-input, ngx-mask, ngx-color-picker, ngx-drag-drop, ngx-dropzone-wrapper - misc: ngx-csv, ngx-lightbox, ngx-masonry, masonry-layout, ngx-pipes, fuzzy-search, axios, moment, leaflet, @types/leaflet, jquery, @types/jquery, prismjs, @types/prismjs, sweetalert2, metismenujs, browserslist, @types/file-saver, @types/lodash Remove the NgModule declarations that only existed for those packages (FlatpickrModule, SimplebarAngularModule, NgPipesModule, NgbTypeaheadModule and unused Ngb/Common/Forms modules), drop the global CSS and JS entries from angular.json, and delete the dead Velzon overrides in angular-custom.scss. @popperjs/core is kept as it is a peer dependency of bootstrap.
The plugin partials only targeted third-party libraries that are no longer installed (swiper, select2, ckeditor, datatables, dropzone, flatpickr, prismjs, sweetalert2, ...). None of their selectors are used by the templates, so they only inflated the shipped CSS bundle. Also remove the unused RTL variants, which were never imported, and the flatpickr block from the dashboard partial.
This was referenced Oct 29, 2026
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The app still carried a large part of the Velzon template dependency set. This PR removes every npm package, Angular module, global asset and stylesheet that is not referenced by the application code, templates or build configuration.
Removed dependencies
@angular/cdk,@angular/material,@ctrl/ngx-emoji-mart,@ng-select/ng-select,simplebar-angular,angular-feather,angular-ng-autocomplete,angular-ng-stepperchart.js,echarts,ng2-charts,ngx-echarts,@types/echartsangularx-flatpickr,flatpickr,ng-otp-input,ngx-mask,ngx-color-picker,ngx-drag-drop,ngx-dropzone-wrapperngx-csv,ngx-lightbox,ngx-masonry,masonry-layout,ngx-pipes,fuzzy-search,axios,moment,leaflet,@types/leaflet,jquery,@types/jquery,prismjs,@types/prismjs,sweetalert2,metismenujs,browserslist,@types/file-saver,@types/lodashnpm uninstalldropped 118 packages in total (transitive dependencies included).Angular modules
pages.module.ts: removedFlatpickrModule,SimplebarAngularModule,NgPipesModule,NgbTypeaheadModule,NgbDropdownModule(only used by the topbar), the redundantHttpClientModuleand the unusedReactiveFormsModulelayouts.module.ts: removedSimplebarAngularModule,NgbNavModule,NgbCollapseModule,FormsModuleandReactiveFormsModuleshared.module.ts: removed the three unusedNgb*modulesapp.module.ts: removed the redundantCommonModule(already exported byBrowserModule)Build config and styles
angular.json: dropped the globalprism.css,flatpickr.cssand@ctrl/ngx-emoji-mart/picker.cssstyles, thejquery/apexchartsscripts (charts are bundled byng-apexcharts) and 38 staleallowedCommonJsDependenciesentriesangular-custom.scss,_dashboard.scssand the plugin imports inapp.scsssrc/typings.d.ts(only declared CKEditor and jQuery globals)Kept on purpose
@popperjs/core: peer dependency ofbootstrapfilesize: peer dependency ofngx-filesize@angular/compiler,@angular/localize,tslib,zone.js: required by the build/runtimeVerification
npm ciinstalls 330 packages with no peer dependency errorng build --configuration=production: success, 0 warning (initial CSS 1.10 MB / 130.50 kB transfer)ng test --watch=false: 24/24 tests across 22 files/,/farmers,/blocks,/farmer/:id,/rewards,/reward/:id,/chia,/pool/status,/pool/stats,/pool/logs,/partials,/info/faq,/info/fee,/info/team,/join,/login): all HTTP 200, 0 console error, 0 page error; ApexCharts, tabs, accordions, terminal, pagination and team images render correctlyng lintreports no target), so there is nothing to runSupersedes
This makes the following Dependabot PRs obsolete, since the packages are removed instead of upgraded:
ng-otp-input(never used)angularx-flatpickr(module imported but no template uses the directive)@lordicon/element(package already absent frommain)#101 and #99 were already closed by Dependabot as up to date.