Last week, the Dojo community announced the release of Dojo 4.0. This version aims for better application optimization and analysis. It comes with better support for code splitting and Progressive Web Apps (PWAs), a redesigned Virtual DOM, and more. Also, TypeScript forwards-compatibility is updated from 2.7 to 3.0.
Separating an application into bundles, better know as code splitting has been possible since the previous versions of Dojo. To do this developers had to add some configuration to specify how the application should be bundled.
Dojo 4.0 helps you to automatically split your application based on its top-level routes. cli-build-app, the CLI command for building optimized Dojo applications, provides this functionality out of the box. Additionally, a bundle analyzer is automatically generated when running a build in production. It will provide you even more insight into the bundles.
CLI is further improved with support for externals, allowing non-modular libraries or standalone applications that cannot be bundled normally to be included in a Dojo application. Support for automatic parsing, hashing, and bundling of resources from index.html, and the inclusion of assets from the catch-all assets directory is also added.
Earlier, all browsers were supported by default. This behavior is now reversed and support for older browsers back to IE11 is available by explicit opt-in. This results in smaller and faster applications for newer browsers as they add support for features natively.
The framework is now optimized for the PRPL pattern in order to support Progressive Web Apps (PWAs). PRPL is a pattern for structuring and serving PWAs, keeping the performance of app delivery and launch in mind.
Here is what it stands for:
To get a better understanding of the PRPL pattern, you can check out the explanation on Google Developers.
The @dojo/framework has also seen various updates and addition of new features:
Read the official announcement at Dojo’s official website and also check their release notes.
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
Vue.js 3.0 is ditching JavaScript for TypeScript. What else is new?