I have inherited an angular application that imports everything under the sun, forcing vendor.bundle.js to be 8 MB.
Is there a utility that allows me to know which modules are not used and can be removed?
Or does AOT take care of this?
Also, do I need to delete the node_modules folder if there is no import associated with it? Or will it not hurt to leave him there, because AOT still will not accept him?
, AOT , NgModule. , ( node_modules), . , .
NgModule
--noUnusedLocals , TypeScript. AOT, , , , AOT, .
--noUnusedLocals
, . , , .
--sourcemaps
--stats-json
ng build
webpack-bundle-analyzer
dist/stats.json
, Angular , , . , , , , CLI .
Source: https://habr.com/ru/post/1693874/More articles:How to decode websocket connection as json stream? - jsonHow to use word boundaries in awk without using the match () function? - regexRemoving unused Angular module dependencies (imports and providers) - moduleАвтоматический выбор радиуса соответствия в jquery - javascriptGoogle Calendar Push notification - notification sent to the source itself - google-calendarFailed to load Awesome font - cssDynamic loading, dynamic binding - chttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1693877/using-atom-as-a-git-editor-fails-to-wait-for-commit-message-why&usg=ALkJrhjcfFD06BXjmCs64z16W8q2yfxOvgWhat are the uses for dlopen vs standard dynamic linking? - chttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1693879/convert-values-of-list-objects-to-string&usg=ALkJrhh9fBJCb0JIcGuySAe5tQPjfquvEwAll Articles