Open tbouliere-datasolution opened 4 months ago
Hi @tbouliere-datasolution, we looked at the changes and figured out several improvements in the Lighthouse test for mobile (Unused JS, FCP, TBT). Thank you for the work! We are not going to take the POC as it is but we are going to look at certain re-arrangements and improvements.
Hello Andreas.
I understand that this type of modification can be hard to integrate. That's why we've abandoned the idea of achieving a correct ligthouse score for the time being. It would take us too far away from the initial trunk.
I can, however, add the following comments:
There aren't enough standalone components in the application. This tends to produce a monolytic application. Shared components and CMS components in particular should be standalone.
Css is only contained in scss files. There is very little component-specific css. This makes refactoring very complicated and css purging rather inefficient. I think this is the result of a one-for-one reworking of the work done several years ago on "inspired". It's not really state-of-the-art anymore.
The ui librairies, which should be in "demo" mode, are intrasectively linked to the application :
And once again, all these libraries are loaded into the core (some even via app.module.ts).
Is your feature request related to a problem? If yes, please describe it.
The application currently performs very poorly in the google lighthouse test in mobile mode. It's true that it's very difficult to optimize angular applications for this test. Even more so with a generic application.
However, there are architectural choices that prevent us from making improvements in our projects:
Describe the desired solution.
Describe alternatives you've considered.
Splitting ShareModule and lazy loading CMS doesn't take so much time. The real difficulty lies in the extensions loaded on the home page.
A first cut has been made here as a poc (~ 4/5 hour of work): https://github.com/tbouliere-datasolution/intershop-pwa/tree/refactor/split-shared-module
Provide additional context.
Initial webpack bundle
Expected splitted webpack bundle
AB#94658