title: Plugin as optimizer and compiler
body: <p>I'm trying to make a plugin which implements the compile &amp; optimize methods.
  In the doc, optimizers and compilers are always in a separated function/class.</p>
  
  <p>Useless I set optimise to true in the config, the compile method is never called.</p>
  
  <p>Is there a way to have both features in a same plugin ?</p>
  
  <p>Edit: I tried <code>MyPluginCompiler.prototype.defaultEnv = '*';</code> </p>