Skip to content

Commit 6e38a73

Browse files
committed
upgrade to babel 7, upgrade gulp-babel & babel-loader to work with babel 7
1 parent f133e48 commit 6e38a73

File tree

5 files changed

+3726
-7333
lines changed

5 files changed

+3726
-7333
lines changed

.babelrc

Lines changed: 0 additions & 19 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+
module.exports = function (api) {
2+
// const env = api.env()
3+
// api.cache.using(() => process.env.NODE_ENV === 'development')
4+
api.cache.never();
5+
6+
return {
7+
presets: ['@babel/preset-env', '@babel/preset-react'],
8+
plugins: [
9+
// Stage 0
10+
'@babel/plugin-proposal-function-bind',
11+
12+
// Stage 1
13+
'@babel/plugin-proposal-export-default-from',
14+
'@babel/plugin-proposal-logical-assignment-operators',
15+
['@babel/plugin-proposal-optional-chaining', { loose: false }],
16+
['@babel/plugin-proposal-pipeline-operator', { proposal: 'minimal' }],
17+
['@babel/plugin-proposal-nullish-coalescing-operator', { loose: false }],
18+
'@babel/plugin-proposal-do-expressions',
19+
20+
// Stage 2
21+
['@babel/plugin-proposal-decorators', { legacy: true }],
22+
'@babel/plugin-proposal-function-sent',
23+
'@babel/plugin-proposal-export-namespace-from',
24+
'@babel/plugin-proposal-numeric-separator',
25+
'@babel/plugin-proposal-throw-expressions',
26+
27+
// Stage 3
28+
'@babel/plugin-syntax-dynamic-import',
29+
'@babel/plugin-syntax-import-meta',
30+
['@babel/plugin-proposal-class-properties', { loose: false }],
31+
'@babel/plugin-proposal-json-strings',
32+
],
33+
};
34+
};

0 commit comments

Comments
 (0)