New issue

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

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

Already on GitHub? Sign in to your account

Use of transform-runtime + proposal-decorators plugins causes Maximum call stack size exceeded #9127

purtuga opened this Issue Dec 4, 2018 · 1 comment


None yet
2 participants

purtuga commented Dec 4, 2018

Bug Report

Current Behavior
The use of @babel/plugin-proposal-decorators together with @babel/plugin-transform-runtime generates a bundle that causes a infinite loop (around _typeof() and _typeof2() eventually causing the browser to throw Uncought RangeError: Maximum call stack size exceeded.

If I remove transform-runtime from the configuration, the bundle generated does not emit any errors.

Input Code

  • REPL or Repo link if applicable:
class Foo {
    get method1() {
        return  "one";

function propDecorator(d) {
    return d;

Expected behavior/code
The transformed code should not cause an infinite loop

Babel Configuration (.babelrc, package.json, cli command)

    "test": {},
    "loader": "babel-loader",
    "options": {
        "babelrc": false,
        "presets": [
                    "modules": false,
                    "loose": false,
                    "forceAllTransforms": true
        "plugins": [
                    "corejs": false,
                    "helpers": true,
                    "regenerator": true,
                    "useESModules": true
                    "legacy": false,
                    "decoratorsBeforeExport": true


  • Babel version(s): 7.2.0
  • Node/npm version: Node v8.9.0, NPM v5.5.1
  • OS: Windows
  • Monorepo No
  • How you are using Babel: Loader (webpack)

All packages:

    "@babel/core": "^7.2.0",
    "@babel/plugin-proposal-class-properties": "^7.2.1",
    "@babel/plugin-proposal-decorators": "^7.2.0",
    "@babel/plugin-transform-async-to-generator": "^7.2.0",
    "@babel/plugin-transform-runtime": "^7.2.0",
    "@babel/preset-env": "^7.2.0",
    "@babel/runtime": "^7.2.0",
    "babel-loader": "^8.0.4",
    "webpack": "^4.27.0",
    "webpack-cli": "^3.1.2"

Thank you in advance for your help/assistance.


This comment has been minimized.


babel-bot commented Dec 4, 2018

Hey @purtuga! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment