Skip to main content

In my case, I had the following .babelrc config:

{
  "presets": [
    ["env", { "modules": false }],
    "react",
    "stage-2"
  ],
  "plugins": [
    "transform-runtime",
    "transform-class-properties",
    "react-hot-loader/babel"
  ]
}

Even though babel-env was specified I still got the error. To fix it I had to remove the "modules": false flag.

In my case I had following .babelrc config:

{
  "presets": [
    ["env", { "modules": false }],
    "react",
    "stage-2"
  ],
  "plugins": [
    "transform-runtime",
    "transform-class-properties",
    "react-hot-loader/babel"
  ]
}

Even though babel-env was specified I still got the error. To fix it I had to remove "modules": false flag.

In my case, I had the following .babelrc config:

{
  "presets": [
    ["env", { "modules": false }],
    "react",
    "stage-2"
  ],
  "plugins": [
    "transform-runtime",
    "transform-class-properties",
    "react-hot-loader/babel"
  ]
}

Even though babel-env was specified I still got the error. To fix it I had to remove the "modules": false flag.

Source Link
Tomasz Mularczyk
  • 36.4k
  • 19
  • 118
  • 176

In my case I had following .babelrc config:

{
  "presets": [
    ["env", { "modules": false }],
    "react",
    "stage-2"
  ],
  "plugins": [
    "transform-runtime",
    "transform-class-properties",
    "react-hot-loader/babel"
  ]
}

Even though babel-env was specified I still got the error. To fix it I had to remove "modules": false flag.