2

After running babel-upgrade, I am still getting this error:

Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/Gabe/esports-calendar/node_modules/babel-preset-es2015-ie/index.js Below is my .babelrc

{
  "presets": [
    "razzle/babel",
    "@babel/env",
    "es2015-ie",
    "@babel/react"
  ],
  "plugins": [
    [
      "@babel/plugin-proposal-decorators",
      {
        "legacy": true
      }
    ],
    "@babel/plugin-syntax-dynamic-import",
    "@babel/plugin-syntax-import-meta",
    [
      "@babel/plugin-proposal-class-properties"
    ],
    "@babel/plugin-proposal-json-strings",
    [
      "@babel/plugin-proposal-private-methods"
    ],
    "@babel/plugin-proposal-function-sent",
    "@babel/plugin-proposal-export-namespace-from",
    "@babel/plugin-proposal-numeric-separator",
    "@babel/plugin-proposal-throw-expressions",
    "@babel/plugin-proposal-export-default-from",
    "@babel/plugin-proposal-logical-assignment-operators",
    "@babel/plugin-proposal-optional-chaining",
    [
      "@babel/plugin-proposal-pipeline-operator",
      {
        "proposal": "minimal"
      }
    ],
    "@babel/plugin-proposal-nullish-coalescing-operator",
    "@babel/plugin-proposal-do-expressions"
  ]
}
Scott Myers
  • 226
  • 9
  • 30
  • 1
    I suppose you have fixed this problem some time ago, or given up using webpack, but if not you should provide the whole error that comes out and your webpack config for someone to have an answer. Consider reading my answer to a similar question https://stackoverflow.com/questions/57026088/webpack-plugin-preset-files-are-not-allowed-to-export-objects-only-functions/60617245#60617245 – user254694 Mar 10 '20 at 12:04

0 Answers0