Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 68f8513

Browse files
committed
Explicitly enable object-rest-spread plugin
We need this because esprima, the JavaScript parser used by electron-link, only supports ES2017, even though our current Electron version supports some ES2018 features. Without this plugin enabled, `npm run test:snapshot` fails with an esprima error.
1 parent 08747d6 commit 68f8513

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.babelrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ module.exports = {
55
"./assert-messages-plugin.js",
66
"@atom/babel-plugin-chai-assert-async",
77
"@babel/plugin-proposal-class-properties",
8+
9+
// Needed for esprima
10+
"@babel/plugin-proposal-object-rest-spread",
811
],
912
presets: [
1013
["@babel/preset-env", {
11-
"targets": {"electron": process.versions.electron}
14+
targets: {electron: process.versions.electron}
1215
}],
1316
"@babel/preset-react"
1417
],

package-lock.json

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"@atom/babel7-transpiler": "1.0.0-1",
4444
"@babel/generator": "7.3.4",
4545
"@babel/plugin-proposal-class-properties": "7.3.4",
46+
"@babel/plugin-proposal-object-rest-spread": "7.3.4",
4647
"@babel/preset-env": "7.3.4",
4748
"@babel/preset-react": "7.0.0",
4849
"babel-plugin-relay": "3.0.0",

0 commit comments

Comments
 (0)