Ember-cli build files splitting vendor code from application code

As you know, vendor (framework and libraries) code should change less often than application code. I’ve seen this approach in yeoman project and I think it make sense.

This means putting all vendor code in one file (jquery, handlebars, ember, …) and application code in another file, so browser can cache vendor.js file and dosn’t re-dowonload it even when we deploy new application. I think this would be specifically good for Ember since it’s quite big in byte size.

What are your thoughts on this approach?

This is the default now with ember-cli, vendor is different from app. That say, there’s still value in splitting those files, depending on how often your app and its dependencies change. For example, we have an internal component library that I would rather have outside of vendor.js, also our app is split into different modules that change at different rates, so we cache aggressively and refresh only smaller files on each deployment.