-
Notifications
You must be signed in to change notification settings - Fork 10
/
babel.config.js
30 lines (29 loc) · 926 Bytes
/
babel.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module.exports = function (api) {
api.cache(true);
// We've assembled some for common environments:
const presets = [
// https://babeljs.io/docs/en/babel-preset-env
"@babel/preset-env",
// https://www.babeljs.cn/docs/babel-preset-react
"@babel/preset-react",
// https://babeljs.io/docs/en/babel-preset-typescript
"@babel/preset-typescript",
];
const plugins = [
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
"@babel/plugin-transform-runtime",
// https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining
"@babel/plugin-proposal-optional-chaining",
// https://babeljs.io/docs/en/babel-plugin-proposal-nullish-coalescing-operator
"@babel/plugin-proposal-nullish-coalescing-operator",
[
"import",
{ libraryName: "antd", libraryDirectory: "lib", style: true },
"ant",
],
];
return {
presets,
plugins,
};
};