Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon

Dojo 5.0 releases with extended support for TypeScript 2.6.x to 3.2.x, condition polyfills, and more!

Save for later
  • 3 min read
  • 06 Mar 2019

article-image

Last week, the team behind the Dojo Toolkit announced the release of Dojo 5.0. This release comes with extended support for TypeScript versions from 2.6.x to 3.2.x, condition polyfills, better Build Time Rendering, and more. Dojo is a JavaScript toolkit that equips developers with everything they need to build a web app like language utilities, UI components, and more.

New features and enhancements in Dojo 5.0

Conditional polyfills


This release provides a better user experience by introducing an out-of-the-box solution for building and loading polyfills in Dojo applications. A polyfill is a piece of code, which implements a feature that web browsers do not support natively.

The Dojo build will produce two platform bundles that will be loaded only if two key conditions are fulfilled. First, the shim module is imported somewhere in an application. Second, a user browser does not natively support the browser feature. This update means serving less JavaScript and hence improving the application performance without compromising on features.

Better Build Time Rendering (BTR)


This version comes with various stability and feature enhancements in BTR such as Dojo Blocks, support for StateHistory API, multiple page HTML generation, better error messaging, and more.

BTR was supported in Dojo via the Dojo cli-build-app command since its initial 2.0.0 release. It provides rendering an application to HTML during the build and in-lines the critical CSS enabling the application to effectively render static HTML pages. It also comes with some advantages of server-side rendering (SSR) such as performance and SEO and eliminates the complexities of running a server to support full SSR.

Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at £16.99/month. Cancel anytime

Dojo Blocks


Dojo Blocks is a new mechanism that allows you to execute code in Node.js as part of the build. A Dojo Block module can do things like reading a group of markdown files, transforming them into VNodes, and making them available to render in the application, all at build time. The results of this Dojo module can be written to the cache that can be used at runtime in the browser.

Simplifying testing with Assertion Templates


Dojo 5.0 comes with Assertion Templates, that makes testing widgets easier. Earlier, developers had to manually curate each ‘expectedRender’ result per test. Assertion Templates solves this problem by allowing developers to easily modify and layer outputs for the expected render.

To read the entire list of updates in Dojo 5.0, check out the official announcement.

Dojo 4.0 released with support for Progressive Web Apps, a redesigned Virtual DOM, and more!

npm at Node+JS Interactive 2018: npm 6, the rise and fall of JavaScript frameworks, and more

Mozilla optimizes calls between JavaScript and WebAssembly in Firefox, making it almost as fast as JS to JS calls