代码拉取完成,页面将自动刷新
/**
* Babel的配置文件
*/
module.exports = function (api) {
api.cache(true); //缓存babel的配置文件,不再重复调用当前函数。
//预设转码
const presets = [
['@babel/env'], //用于支持IE9等老式浏览器使用新的JS语法,需要安装:@babel/preset-env
['@babel/react'] //用于支持IE9等老式浏览器使用React的语法,,需要安装:@babel/preset-react
];
//插件
const plugins = [
[
'import', //按需加载,需要安装babel-plugin-import
{libraryName: 'antd-mobile', libraryDirectory: 'es', style: true}
],
[
'@babel/plugin-proposal-decorators', //用来支持修饰器,需要安装:@babel/plugin-proposal-decorators
{legacy: true} //注意:legacy需要为true。
],
'transform-class-properties' //用于在class中声明属性(包含静态属性),需要安装:babel-plugin-transform-class-properties
];
return {presets, plugins};
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。