title: Babel does not compile when using Rollup's TypeScript plugin with Babel
body: <p>I can't get @rollup/plugin-typescript to work with @rollup/plugin-babel, and the JS generated from TS code is not translated by Babel</p>
  <p>I looked for solutions to related problems, but they didn't seem to work(<a href="https://stackoverflow.com/questions/53437261/babel-7-not-transpiling-when-used-in-rollup-with-typescript-plugin">babel 7 not transpiling when used in rollup with typescript plugin</a>)</p>
  <p>Below is my rollup config</p>
  <pre><code>import { terser } from &quot;rollup-plugin-terser&quot;;
  import pluginTypescript from &quot;@rollup/plugin-typescript&quot;;
  import pluginCommonjs from &quot;@rollup/plugin-commonjs&quot;;
  import pluginNodeResolve from &quot;@rollup/plugin-node-resolve&quot;;
  
  import { babel } from &quot;@rollup/plugin-babel&quot;;
  import * as path from &quot;path&quot;;
  import pkg from &quot;./package.json&quot;;
  
  const moduleName = pkg.name.replace(/^@.*\//, &quot;&quot;);
  const inputFileName = &quot;src/main.ts&quot;;
  const author = pkg.author;
  const banner = `
    /**
     * @license
     * author: ${author}
     * ${moduleName}.js v${pkg.version}
     * Released under the ${pkg.license} license.
     */
  `;
  
  export default [
    {
      input: inputFileName,
      output: [
        {
          name: moduleName,
          file: pkg.browser,
          format: &quot;iife&quot;,
          //sourcemap: &quot;inline&quot;,
          banner,
        },
        {
          name: moduleName,
          file: pkg.browser.replace(&quot;.js&quot;, &quot;.min.js&quot;),
          format: &quot;iife&quot;,
          sourcemap: &quot;inline&quot;,
          banner,
          plugins: [terser()],
        },
      ],
      plugins: [
        pluginTypescript(),
        pluginCommonjs({
          extensions: [&quot;.js&quot;, &quot;.ts&quot;],
        }),
        babel({
          extensions: [&quot;.ts&quot;],
          include: path.resolve(&quot;src&quot;, &quot;**&quot;, &quot;*.ts&quot;),
          babelHelpers: &quot;bundled&quot;,
          configFile: path.resolve(__dirname, &quot;.babelrc.js&quot;),
        }),
        pluginNodeResolve({
          browser: true,
        }),// 
      ],
    }
  ];
  </code></pre>
  <p>Here is my Babel configuration</p>
  <pre><code>{
    &quot;presets&quot;: [
      [
        &quot;@babel/env&quot;,
        {
          &quot;modules&quot;: false,
          &quot;targets&quot;: {
            &quot;browsers&quot;: &quot;&gt; 1%, last 2 versions, ie &gt; 11&quot;
          }
        }
      ]
    ],
    &quot;plugins&quot;: [
      [
        &quot;@babel/plugin-proposal-class-properties&quot;
      ],
      [
        &quot;@babel/plugin-transform-runtime&quot;,
        {
          &quot;absoluteRuntime&quot;: false,
          &quot;corejs&quot;: 3,
          &quot;helpers&quot;: true,
          &quot;regenerator&quot;: true,
          &quot;version&quot;: &quot;^7.13.17&quot;
        }
      ]
    ]
  }
  </code></pre>
  <p>Rollup and related versions that I use</p>
  <pre><code> &quot;devDependencies&quot;: {
      &quot;@babel/cli&quot;: &quot;^7.13.16&quot;,
      &quot;@babel/core&quot;: &quot;^7.13.16&quot;,
      &quot;@babel/helpers&quot;: &quot;^7.13.17&quot;,
      &quot;@babel/plugin-transform-runtime&quot;: &quot;^7.13.15&quot;,
      &quot;@babel/preset-env&quot;: &quot;^7.13.15&quot;,
      &quot;@rollup/plugin-babel&quot;: &quot;^5.3.0&quot;,
      &quot;@rollup/plugin-commonjs&quot;: &quot;^18.0.0&quot;,
      &quot;@rollup/plugin-node-resolve&quot;: &quot;^11.2.1&quot;,
      &quot;@rollup/plugin-typescript&quot;: &quot;^8.2.1&quot;,
      &quot;@types/jest&quot;: &quot;^26.0.22&quot;,
      &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^4.22.0&quot;,
      &quot;@typescript-eslint/parser&quot;: &quot;^4.22.0&quot;,
      &quot;eslint&quot;: &quot;^7.24.0&quot;,
      &quot;jest&quot;: &quot;^26.6.3&quot;,
      &quot;rollup&quot;: &quot;^2.45.2&quot;,
      &quot;rollup-plugin-terser&quot;: &quot;^7.0.2&quot;,
      &quot;ts-jest&quot;: &quot;^26.5.5&quot;,
      &quot;typescript&quot;: &quot;^4.2.4&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@amipei/cookie&quot;: &quot;0.0.2&quot;,
      &quot;@babel/runtime&quot;: &quot;^7.13.17&quot;,
      &quot;@babel/runtime-corejs3&quot;: &quot;^7.13.17&quot;,
      &quot;tslib&quot;: &quot;^2.2.0&quot;
    }
  </code></pre>
  <p>Where did I go wrong? Please answer me. Rollup has been torturing me for days</p>