Skip to content

Dynamic imports

Choose a tag to compare

@bmomberger-bitovi bmomberger-bitovi released this 19 Sep 22:45
· 112 commits to master since this release

This release provides dynamic importing through the <can-dynamic-import> tag, supported by parser changes in https://github.com/canjs/can-stache/releases/tag/v3.7.3

Imports into a view can now be loaded by using the <can-dynamic-import> custom tag. Unlike the <can-import> tag (which blocks the template from rendering under certain conditions), <can-dynamic-import> will never block template rendering while waiting for the imported module to load, and instead provides a Promise that will resolve to the imported module.