Is there any chance that soft-nav functionality could be separated from hard-nav functionality in the future, at a source level?
The current approach makes sense from a developer experience perspective, but it comes with an unfortunate compromise: it inflates bundle size in a non-preventable way for consumers that don't need soft nav data, since the functionality is built into the existing endpoints and merely toggled with a boolean. This means it can't be tree-shaken away, and removing it would involve maintaining a set of patches.
Would something similar to the separate attribution endpoints be a possibility?
To be fair, the inflation isn't massive (around 3KB raw, or 1KB gzipped), but it is a large % increase over v5 (> 50%, going by the raw numbers). We try very hard to keep our RUM script as small as possible, since it needs to be widely deployed across every page we host, and web-vitals already accounts for around half of our bundle with v5; v6 would be a significant step back.
Thanks!
Is there any chance that soft-nav functionality could be separated from hard-nav functionality in the future, at a source level?
The current approach makes sense from a developer experience perspective, but it comes with an unfortunate compromise: it inflates bundle size in a non-preventable way for consumers that don't need soft nav data, since the functionality is built into the existing endpoints and merely toggled with a boolean. This means it can't be tree-shaken away, and removing it would involve maintaining a set of patches.
Would something similar to the separate
attributionendpoints be a possibility?To be fair, the inflation isn't massive (around 3KB raw, or 1KB gzipped), but it is a large % increase over v5 (> 50%, going by the raw numbers). We try very hard to keep our RUM script as small as possible, since it needs to be widely deployed across every page we host, and
web-vitalsalready accounts for around half of our bundle with v5; v6 would be a significant step back.Thanks!