title: Rollup typescript decorators support
body: <p>I get following error message:</p>
  
  <blockquote>
    <p>Error: Parse Error: Line 29: Unexpected token ILLEGAL</p>
  </blockquote>
  
  <p>the corresponding line of code is mobx observer decorator:</p>
  
  <pre><code>@observer
  class Wrapper extends Component&lt;IProps&gt; {
  </code></pre>
  
  <p>I have following rollup.config.js:</p>
  
  <pre><code>import typescript from 'rollup-plugin-typescript2'
  import jsx from 'rollup-plugin-jsx'
  import pkg from './package.json'
  export default {
    input: 'src/index.ts',
    output: [
      {
        file: pkg.main,
        format: 'cjs',
      },
      {
        file: pkg.module,
        format: 'es',
      },
    ],
    external: [
      ...Object.keys(pkg.dependencies || {}),
      ...Object.keys(pkg.peerDependencies || {}),
    ],
  plugins: [
      jsx( {factory: 'React.createElement'} ),
      typescript({
        typescript: require('typescript'),
      }),
    ],
  }
  </code></pre>
  
  <p>my tsconfig.json:</p>
  
  <pre><code>{
    "compilerOptions": {
      "declaration": true,
      "declarationDir": "./dist",
      "module": "es6",
      "experimentalDecorators": true,
      "outDir": "./dist",
      "target": "es5",
      "jsx": "react",
      "types": ["reflect-metadata", "node"],
      "skipLibCheck": true,
      "esModuleInterop": true,
      "allowSyntheticDefaultImports": true,
      "strict": false,
      "forceConsistentCasingInFileNames": true,
      "strictPropertyInitialization": false,
      "moduleResolution": "node",
      "resolveJsonModule": true,
      "noEmit": true,
      "emitDecoratorMetadata": true,
      "noEmitHelpers": true,
      "importHelpers": true,
      "sourceMap": true,
      "noImplicitReturns": false,
      "noImplicitThis": false,
      "noImplicitAny": false,
      "strictNullChecks": false,
      "suppressImplicitAnyIndexErrors": false,
      "noUnusedLocals": true
    },
    "include": [
      "src/**/*"
    ],
    "exclude": ["node_modules"]
  }
  </code></pre>
  
  <p>As of documentation tells, <a href="https://github.com/ezolenko/rollup-plugin-typescript2" rel="noreferrer">https://github.com/ezolenko/rollup-plugin-typescript2</a> plugin should take all the options from my tsconfig.json file, also "experimentalDecorators": true, but does not seem to work.</p>