Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (30 sloc) 846 Bytes
---
id: babel-plugin-syntax-object-rest-spread
title: @babel/plugin-syntax-object-rest-spread
sidebar_label: syntax-object-rest-spread
---

Syntax only

It's unlikely you want to use this plugin directly as it only enables Babel to parse this syntax. Instead, use plugin-proposal-object-rest-spread to both parse and transform this syntax.

Installation

npm install --save-dev @babel/plugin-syntax-object-rest-spread

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["@babel/plugin-syntax-object-rest-spread"]
}

Via CLI

babel --plugins @babel/plugin-syntax-object-rest-spread script.js

Via Node API

require("@babel/core").transform("code", {
  plugins: ["@babel/plugin-syntax-object-rest-spread"]
});
You can’t perform that action at this time.