adobe / adobe/aem-project-archetype
ui.frontend clientlib generation potential performance optimization
- Dominant language
- JavaScript
- Stars
- 596
- Forks
- 431
- Avg merge
- 10d 6h
- Merged PRs (30d)
- 1
Description
### Expected Behaviour
The webpack build outputs 3 chunks: runtime, vendor, main. These 3 files should be loaded onto pages seperately in order to leverage browser caching in the most optimal manner.
### Actual Behaviour
The clientlibs generator will create a single clientlib (clientlib-react) containing all 3 of these files. Bundling them together and creating its hash based on the content of all 3.
These means that whenever we make a change the "main" bundle, the hash of the clientlib changes causing browser cache to be busted.
If we had 3 clientlibs, each bundle would have its own independent cache and hash value.

### Reproduce Scenario (including but not limited to)
#### Steps to Reproduce
1) Build the sample produced by the archetype using a react frontend
2) Observe the js.txt definition of clientlibs-react
#### Platform and Version
All
#### Sample Code that illustrates the problem
#### Logs taken while reproducing problem
Contributor guide
Research direction
Start with the React frontend sample generated by the archetype and inspect the js.txt definition of clientlibs-react, then trace how the webpack runtime, vendor, and main chunks are gathered into that clientlib. Confirm the generated output and determine how separate clientlibs would preserve independent hashes and browser caching.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, webpack
- Domain
- build-system, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100