Skip to content

Commit 799514f

Browse files
amithgeorgeJeevan-Kishore
authored andcommitted
feat(build): upgrade to Babel 7 (#55)
* upgrade to babel 7.1 * fix package-lock after rebasing against master * Bump dependencies to latest versions
1 parent e83a413 commit 799514f

File tree

4 files changed

+1178
-1341
lines changed

4 files changed

+1178
-1341
lines changed

.babelrc

Lines changed: 0 additions & 18 deletions
This file was deleted.

babel.config.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"use strict";
2+
3+
module.exports = function(api) {
4+
const env = api.env();
5+
let envOptions = {modules: false};
6+
let plugins = [
7+
"annotate-pure-calls",
8+
"@babel/plugin-syntax-object-rest-spread",
9+
"transform-react-remove-prop-types",
10+
"@babel/plugin-syntax-dynamic-import"
11+
];
12+
13+
if (env === 'esmodules') {
14+
envOptions = {"targets": {"esmodules": true}};
15+
}
16+
17+
if (env === 'test') {
18+
envOptions = {"targets": {"node": true}};
19+
plugins.push("babel-plugin-quintype-assets");
20+
}
21+
22+
let config = {
23+
presets: [
24+
"@babel/preset-react",
25+
[
26+
"@babel/preset-env",
27+
envOptions
28+
],
29+
],
30+
plugins: plugins
31+
};
32+
33+
return config;
34+
}

0 commit comments

Comments
 (0)