» Posts by David Barreto

From REST to GraphQL

Written by David Barreto

I've been hearing about GraphQL lately, a library to create an API endpoint for your data. GraphQL has been positioned as a replacement for our traditional REST backends as it tries to solve the same problem. Which is, to make data available for our web or mobile apps, but with a different approach that is supposed to be more flexible. To be honest, I was...

Read More »

Optimize your Angular 2 Application with Tree Shaking

Written by David Barreto

Disclaimer: As commenter Ben Elliot pointed out, the UglifyJs plugin used in the Webpack build is not able to remove unused Typescript classes because those, when transpiled, are implemented using IIFE. The bundle size mentioned in this post is not really reflecting tree shaking but minification. To be able to properly apply tree shaking we need to use a different module loader like Rollup. The...

Read More »