I am optimizing the page speed of my Magento 2 frontend. Everything is logically so far... CSS files can be removed through XML, everything should be minified, lazy loaded and so on.
BUT: The size of all javascript files that are loaded is 12 MB (!!!). That is insane, sorry. There is so much unused crap loaded, like:
datepicker.js, timepicker.js, spectrum.js, tinycolor.js and so on... are just a few examples.
I know, the Magento 2 ui component / model structure is complicated, but how can i prevent all this JS files from beeing loaded? They are not used and i have no idea, how to prevent this unneccesary bytes from destroying my complete page speed.
I just want to remove this JS-files or complete modules like removing CSS-files. Can anyone help me with an example?
Thank you.