Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Must use @babel/plugin-transform-runtime even though I am using it #854

Closed
puchm opened this issue Apr 7, 2021 · 3 comments
Closed

Must use @babel/plugin-transform-runtime even though I am using it #854

puchm opened this issue Apr 7, 2021 · 3 comments

Comments

@puchm
Copy link

puchm commented Apr 7, 2021

  • Rollup Plugin Name: Babel
  • Rollup Plugin Version: 5.3.0
  • Rollup Version: 2.44.0
  • Operating System (or Browser): Win10 18363.1379
  • Node Version: 12.18.2
  • Link to reproduction (⚠️ read below): https://github.com/puchm/rollup-issue-demo
    Sorry, it's not using the Rollup REPL - it's very minimal though since I created it from scratch. I hope this is ok.

Expected Behavior

When @babel/plugin-transform-runtime is in the Babel plugins array inside .babelrc, the following error has no reason to appear as far as I'm concerned:

Error: You must use the `@babel/plugin-transform-runtime` plugin when `babelHelpers` is "runtime"

Actual Behavior

The above error message appears.

Additional Information

When making the reproduction repo I noticed that this issue pops up as soon as I add the Node resolve plugin. (babel.config.js, lines 17-19). When I remove those lines the error doesn't appear. Instead, it fails to resolve the import from main.ts to test.ts.

What is the issue here?

Thanks,
-Moritz

@solarjoker
Copy link

I got the same error

@stale stale bot added the x⁷ ⋅ stale label Jun 13, 2021
@stale
Copy link

stale bot commented Jun 14, 2021

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.

@stale stale bot closed this as completed Jun 14, 2021
@NateScarlet
Copy link

I just use

    pluginBabel({
      extensions,
      babelHelpers: 'runtime',
      skipPreflightCheck: true,
    }),

then build output seems correct

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants