GitHub · npm · Edit this page
Syntax only
This plugin only allows Babel to parse this syntax. If you want to transform it then see transform-object-rest-spread.
This plugin allows Babel to parse object rest spread syntax.
npm install --save-dev babel-plugin-syntax-object-rest-spread
.babelrc
(Recommended).babelrc
{
"plugins": ["syntax-object-rest-spread"]
}
babel --plugins syntax-object-rest-spread script.js
require("babel-core").transform("code", {
plugins: ["syntax-object-rest-spread"]
});