Blog >

Yeoman build slow due to ‘usemin’ of installed components

I also encountered another issue with the Yeoman build process, in that, with a few installed GitHub components, ‘building’ was very slow / took forever.

The easy way to solve this, in your Grunt.js file, is to be more ‘specific’ in the files that are run through ‘usemin’, like so:

Slow (didn’t finish / I gave up waiting):

// update references in HTML/CSS to revved files
usemin: {
html: ['**/*.html'],
css: ['**/*.css']
},

Significantly faster (3 minutes or so):

// update references in HTML/CSS to revved files
usemin: {
html: ['views/*.html'],
css: ['styles/*.css']
},

This way no HTML assets from your installed components that may be HTML heavy get processed by the built script (note that simply adding the ‘components’ folder to my .gitignore file does not cause them to be ignored by the ‘usemin’ process).