steal-tools 1.4.0 is out! 💥🎆 This release marks a big shift in how steal-tools builds applications, as it introduces optimized builds (aka, slim builds). These use a new loader we wrote just for produce use that only includes the bare minimum necessary to load an application.
You can learn about our plans for developing optimized builds from this blog article. For now some feature that you might be using in StealJS aren't implemented. But don't worry, you can try it out and it will tell you if your application is not compatible.
To try out using the new stealTools.optimize()
API check out the guide, which will have you use the slim loader on an example application. The result is a 46% bundle!
One of the most exciting aspects of the new API is that it allows you to load your bundles using async
script tags:
<body>
<div class="container">Hello World.</div>
<script src="./dist/bundles/myhub/myhub.js"></script>
<script async src="./dist/bundles/myhub/weather/weather.js"></script>
<script async src="./dist/bundles/myhub/puppies/puppies.js"></script>
</body>
This means all of your bundles can be loaded in parallel, for faster loads (in supporting browsers).
In addition to the guide, check out the steal-tools.optimize documentation on the extra features it includes.