Skip to content

can-import and can-dynamic-import tag parsing changes

Choose a tag to compare

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

Note: This release has been deprecated as it also contains the features that were documented in the 3.8.0 release. You should use version 3.8.0 or later for correct semver.

This release changes the behavior of <can-import> tags in a subtle way:

  • as a self-closing tag, register a static import (no change from previous)
  • as an enclosing tag with no non-space content, register a static import (this is a change from previous, but in a way that could not break existing usage -- this is so that users can use <can-import></can-import> with nothing in between the same as <can-import/> and it therefore seems more HTMLy).
  • as an enclosing tag with non-space content (tags/chars/special), register a dynamic import (no change from previous)

This release also adds support for the <can-dynamic-import> tag, which always imports dynamically whether or not it is self-closing or has content.

For more on dynamic imports, see https://canjs.com/doc/can-view-import.html after CanJS 3.11 is released