title: The decorators plugin requires a 'decoratorsBeforeExport' option
body: <p>I'm using Next.js with typescript. I am trying to also use TypeORM, like so:</p>
  <pre><code>@Entity()
  export class UserModel extends BaseEntity {
    @PrimaryGeneratedColumn('uuid')
    id: number
  }
  </code></pre>
  <p>But I'm getting an error:</p>
  <blockquote>
  <p>Error: [BABEL] /home/aironside/Documents/private/tatooify/pages/api/user.ts: The decorators plugin requires a 'decoratorsBeforeExport' option, whose value must be a boolean. If you want to use the legacy decorators semantics, you can set the 'legacy: true' option.</p>
  </blockquote>
  <p>Here's my .babelrc</p>
  <pre><code>{
    &quot;presets&quot;: [&quot;next/babel&quot;],
    &quot;plugins&quot;: [
      &quot;@babel/plugin-proposal-decorators&quot;, { 
        &quot;legacy&quot;: true
       },
    ]
  }
  </code></pre>
  <p>And here's the related package.json part</p>
  <pre><code>{
    &quot;dependencies&quot;: {
      &quot;@babel/plugin-proposal-decorators&quot;: &quot;^7.12.13&quot;,
      ...
    },
    &quot;devDependencies&quot;: {
      ...
    }
  }
  </code></pre>
  <p>From what I found, most errors are caused by either not having this plugin installed, or it being in devDep instead of dependencies. What am I missing?</p>