summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmīls Piņķis <emils@mullvad.net>2018-04-18 14:57:54 +0100
committerEmīls Piņķis <emils@mullvad.net>2018-04-19 12:42:49 +0100
commit6401d48895dbcb622ff367c5abd3fae350b0c7ec (patch)
treefff74bb72bcffa242bdfece02218a02f7e33c611
parent3c408fabd5caee565882a50fdd47ebdc497da061 (diff)
downloadmullvadvpn-6401d48895dbcb622ff367c5abd3fae350b0c7ec.tar.xz
mullvadvpn-6401d48895dbcb622ff367c5abd3fae350b0c7ec.zip
Add transform-builtin-extend babel plugin to allow extending Error class
-rw-r--r--.babelrc6
-rw-r--r--package.json1
-rw-r--r--yarn.lock11
3 files changed, 13 insertions, 5 deletions
diff --git a/.babelrc b/.babelrc
index 48109eda11..e80554d930 100644
--- a/.babelrc
+++ b/.babelrc
@@ -2,10 +2,10 @@
"env": {
"electron": {
"presets": ["es2015", "stage-0", "react"],
- "plugins": ["transform-runtime", "inline-react-svg"]
+ "plugins": ["transform-runtime", "inline-react-svg", ["babel-plugin-transform-builtin-extend", { "globals": ["Error"] }]]
},
"development": {
- "presets": ["react-native"]
+ "presets": ["react-native", ["babel-plugin-transform-builtin-extend", { "globals": ["Error"] }]]
}
}
-} \ No newline at end of file
+}
diff --git a/package.json b/package.json
index 12f9f41472..b7d77d582b 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
"repository": "https://github.com/mullvad/mullvadvpn-app",
"license": "GPL-3.0",
"dependencies": {
+ "babel-plugin-transform-builtin-extend": "^1.1.2",
"babel-runtime": "^6.22.0",
"d3-geo-projection": "^2.3.2",
"electron-log": "^2.2.8",
diff --git a/yarn.lock b/yarn.lock
index 2eafe1ebf3..223260621a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -749,6 +749,13 @@ babel-plugin-transform-async-to-generator@^6.24.1:
babel-plugin-syntax-async-functions "^6.8.0"
babel-runtime "^6.22.0"
+babel-plugin-transform-builtin-extend@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/babel-plugin-transform-builtin-extend/-/babel-plugin-transform-builtin-extend-1.1.2.tgz#5e96fecf58b8fa1ed74efcad88475b2af3c9116e"
+ dependencies:
+ babel-runtime "^6.2.0"
+ babel-template "^6.3.0"
+
babel-plugin-transform-class-constructor-call@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9"
@@ -1236,14 +1243,14 @@ babel-register@^6.24.1, babel-register@^6.26.0:
mkdirp "^0.5.1"
source-map-support "^0.4.15"
-babel-runtime@^6.0.0, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0:
+babel-runtime@^6.0.0, babel-runtime@^6.18.0, babel-runtime@^6.2.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
dependencies:
core-js "^2.4.0"
regenerator-runtime "^0.11.0"
-babel-template@^6.15.0, babel-template@^6.24.1, babel-template@^6.26.0:
+babel-template@^6.15.0, babel-template@^6.24.1, babel-template@^6.26.0, babel-template@^6.3.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
dependencies: