title: Decorators with babel, unexpected token
body: <p>I'm trying to use decorators on classes in React, using babelify. I have the 'es7.decorators' option applied in babel, but I keep getting an 'unexpected token' error when it encounters the '@' character.</p>
  
  <p>Anyone have any ideas? A simple example is below.</p>
  
  <p>Decorator:</p>
  
  <pre><code>export default function(Component) {
    return class extends Component {
      constructor() {...}
    }
  }
  </code></pre>
  
  <p>Class:</p>
  
  <pre><code>import myDecorator from 'decorator';
  
  @myDecorator
  class MyClass{...}
  </code></pre>
  
  <p>I'm using <a href="https://github.com/babel/babelify#babelify" rel="nofollow noreferrer">babelify</a> (Browserify transform for Babel):</p>
  
  <pre><code>browserify().transform(babelify.configure({
    optional: ['es7.decorators']
  })
  </code></pre>