Skip to content

Instantly share code, notes, and snippets.

@matthewp
Last active July 10, 2017 18:21
Show Gist options
  • Save matthewp/0300d9b1122f3b94eaec008c747564c8 to your computer and use it in GitHub Desktop.
Save matthewp/0300d9b1122f3b94eaec008c747564c8 to your computer and use it in GitHub Desktop.
steal-tools 1.4.0 release notes

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.

Optimized Builds

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!

Using stealTools.build

steal-tools.build

Using stealTools.optimize

steal-tools.optimize

async scripts

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment