![]()
This sample illustrates how SPFx functionality and packages can be bundled in multiple ‘.js’ files then be dynamically & asynchronously loaded into the page at execution time, such as with a button click.
Open this sample in the gallery (popup panel): Open in gallery
Source: https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/js-dynamic-bundling-libraries