sp-dev-fx-webparts/samples/js-dynamic-bundling-libraries
petkir 71f6469fa0 URL dev.office.com to docs.microsoft.com 2020-06-09 09:09:22 +02:00
..
assets Dynamic SPFx Bundling/Loading Web Part Example (#628) 2018-10-03 08:02:22 -04:00
config Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00
src Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00
teams Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00
.editorconfig Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00
.gitignore Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00
.yo-rc.json Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00
README.md URL dev.office.com to docs.microsoft.com 2020-06-09 09:09:22 +02:00
gulpfile.js Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00
package-lock.json Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00
package.json Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00
tsconfig.json Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00
tslint.json Upgrade js-dynamic-bundling-libraries to SPFx 1.7.0 (#709) 2018-12-08 18:57:35 +02:00

README.md

Dynamics Bundling & Loading of SPFx Packages

Summary

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.

Pre Button Click: preview

Post Button Click that imports jQuery and additional functionality: preview

Used SharePoint Framework Version

drop

Applies to

Solution

Solution Author(s)
js-dynamic-bundling-libaries David Warner II (@DavidWarnerII / Warner Digital)

Version history

Version Date Comments
1.0 September 21, 2018 Initial release
1.1 December 3, 2018 Updated for SPFx 1.7.0

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • Clone this repository
  • in the command line run:
    • npm install
    • gulp serve

Features

This Web Part illustrates the following concepts on top of the SharePoint Framework:

  • How to separate SPFx functionality into multiple bundled files
  • How to asynchronously load the seperate bundled files at execution time
  • Including a library in the separate bundled file.

Additional Information: