Coagmano:stylus now supports Meteor 1.8's Lazy Compilation

As mentioned in the 1.8 release announcement:

… compiler plugins compile every file they receive, regardless of whether the file will ever actually be imported, and even if the compiled code appears nowhere in the final build.

This unnecessary compilation accounts for a substantial share of build time in many large Meteor applications, and so we are thrilled to announce that Meteor 1.8 finally introduces a simple mechanism for avoiding compilation of unused files.

And so it’s compiler plugin update time!

coagmano:stylus now uses this new behaviour from version 1.1.0

Big caveat, only applies to files ending in .import.styl or marked as isImport when added in Package.js using api.addFiles

If there’s any interest I’ll consider implementing a stylus entry-point in package.json (like Meteor 1.7 introduced), at which point it would lazy load everything except that first file.