forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
758 B
35 lines
758 B
5 years ago
|
module.exports = function (api) {
|
||
|
api.cache(true);
|
||
|
const presets = [
|
||
|
[
|
||
|
"@babel/preset-env",
|
||
|
{
|
||
|
targets: {
|
||
|
ie: 9,
|
||
|
chrome: 47,
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
"@babel/preset-typescript",
|
||
|
];
|
||
|
const plugins = [
|
||
|
[
|
||
|
"@babel/plugin-proposal-decorators",
|
||
|
{
|
||
|
legacy: true,
|
||
|
},
|
||
|
],
|
||
|
"@babel/plugin-proposal-class-properties",
|
||
|
"@babel/plugin-transform-block-scoping",
|
||
|
["@babel/plugin-transform-classes", {
|
||
|
loose: true,
|
||
|
}],
|
||
|
"@babel/plugin-transform-proto-to-assign",
|
||
|
];
|
||
|
|
||
|
return {
|
||
|
presets,
|
||
|
plugins,
|
||
|
};
|
||
|
};
|