youtube image
From YouTube: SPFx optimizing bundles with code splitting chunks

Description

In this 10-minute Developer - focused demo, David Warner shows viewers how to optimally split, combine and name .js files for your bundles to speed up initial page load and debugging as well as to provide actionable telemetry. See how to split your web parts functionality into multiple .js files and use WebpackChunkName to append friendly names to default GUID like .js file names. Files are loaded as needed - at time of execution, i.e., with a button click. This PnP Community demo is taken from the SharePoint Framework and JavaScript Special Interest Group (SIG) – Bi-weekly sync call recorded on August 13, 2020.

Demo Presenter: David Warner (Catapult Systems) | @DavidWarnerII

Supporting materials:
• Blog post - Dynamic SPFx Package Bundling | http://warner.digital/dynamic-spfx-package-bundling/
• Documentation - Dynamic loading of packages in SharePoint Framework | https://docs.microsoft.com/en-us/sharepoint/dev/spfx/dynamic-loading/
• Blog post - SPFx Optimized Package Bundling – Chunk Names – Part 1 – Custom Bundle Names | http://warner.digital/spfx-optimized-package-bundling-chunk-names-part1/
• Repo - Dynamics Bundling & Loading of SPFx Packages | https://github.com/pnp/sp-dev-fx-webparts/tree/master/samples/js-dynamic-bundling-libraries

Learn more:
• Learn more about the Microsoft 365 Patterns and Practices community at: http://aka.ms/m365pnp
• Visit the Microsoft 365 Patterns and Practices community YouTube channel: https://aka.ms/m365pnp-videos