如果你使用的是Babel 7 ,添加Babel 的插件 yarn add -D @babel/plugin-transform-runtime 然后在Babel运行配置文件 .babelrc的添加该插件