Trace: The node type SpreadProperty has been renamed to SpreadElement at Object.isSpreadProperty

here is the final setting that solved problem for me.

.babelrc

{
  "presets": [
    "@babel/preset-env",
    "@babel/preset-react"
  ],
  "plugins": [
    "@babel/plugin-proposal-object-rest-spread"
  ]
}

For a better understanding, here is my package.json's devDependencies:

"devDependencies": {
    "@babel/core": "^7.1.6",
    "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
    "@babel/plugin-transform-object-assign": "^7.0.0",
    "@babel/plugin-transform-react-jsx": "^7.1.6",
    "@babel/preset-env": "^7.1.6",
    "@babel/preset-react": "^7.0.0",
    "babel-loader": "8.0.4",
    "prop-types": "15.6.2",
    "react": "^16.6.3",
    "react-dom": "^16.6.3",
    "style-loader": "^0.23.1",
    "utils": "^0.3.1",
    "webpack": "4.26.1",
    "webpack-cli": "3.1.2",
    "webpack-dev-server": "^3.1.10"
  }

Here is my webpack.config.js module's section:

module: {
        rules: [
            {
                test: /\.(js|jsx)$/ ,
                exclude: /node_modules/,
                loaders: "babel-loader"
            }
        ]
    }

This issue is occurring due to using outdated

`"babel-plugin-transform-object-rest-spread"`

update this in package.json

`"@babel/plugin-proposal-object-rest-spread": "^7.0.0",`

and update your .babelrc.js file in my case it looks like this

const isTest = String(process.env.NODE_ENV) === 'test'
module.exports = {
  presets: [["@babel/env", { modules: isTest ? 'commonjs' : false }, "@babel/react"]],
  plugins: [
    'syntax-dynamic-import',
    'transform-class-properties',
    '@babel/plugin-proposal-object-rest-spread',
  ],
}

this solves my problem


Before in my .babelrc

i was using the plugin: ["transform-object-rest-spread", { "useBuiltIns": true }],

then i switch it to "@babel/plugin-proposal-object-rest-spread" and all those warnings went away, which has been very nice. `