This allows for using the object spread syntax in the source, such as:
updated_players = {...players, id: {name: "player-name"}}
which babel will transform to something else for us.
"development": {
"plugins": [
"transform-react-jsx-self",
- "transform-react-jsx-source"
+ "transform-react-jsx-source",
+ "transform-object-rest-spread"
]
}
}
Dependencies
------------
Compiling the source requires the babel (version 6) CLI to be
-available as "babeljs" along with the "react" preset. This can be
-achieved on Debian with:
+available as "babeljs" along with the "react" preset and support for
+"object spread" syntax. This can be achieved on Debian with:
- sudo apt install node-babel-cli node-babel-preset-react
+ sudo apt install \
+ node-babel-cli \
+ node-babel-preset-react \
+ node-babel-plugin-transform-object-rest-spread