Skip to content

v2: more async

Compare
Choose a tag to compare
@ogonkov ogonkov released this 05 Jul 17:50
· 35 commits to master since this release
  • BREAKING CHANGE: global function static replaced with static tag (#74). This happens because globals is not supporting async operations, while dynamic assets is using promises, when loaded with import() syntax. To upgrade to this version you need to replace all global static invocation with new static tag.

    - {{ static('image.png') }}
    + {% static 'image.png' %}
    - {% set foo = static('bar.jpg') %}
    + {% static 'bar.jpg' as foo %}
  • BREAKING CHANGE: handling of async templates is now even better (#67). When loader found async tags or extensions it calls template render via callback, and wrap it to Promise. It was only available for asynchronous filters before, and in some cases could prevent templates from proper rendering, now it should cover all cases, when asynchronous render required.

  • New option esModule added (#65). It will change output to ES module syntax.

  • Minor changes to readme (#63), defaults handling (#72), refactoring (#73)