问题:
当我尝试启动节点服务器控制台时,发出尖叫声:
/@babel/core/lib/transformation/file/file.js:173
throw new Error("This API has been removed. If you're looking for this " + "functionality in Babel 7, you should import the " + "'@babel/helper-module-imports' module and use the functions exposed " + " from that module, such as 'addNamed' or 'addDefault'.");我发现它是使用addImport()函数的babel-plugin-import-inspector,该函数被弃用并抛出错误。
我不能停止使用这个插件,因为它与react-loadable高度相关;
在这种情况下我该怎么办?我的巴别塔版本是7,也许我应该降级?
顺便说一句,babel允许我使用@babel/helper- module -imports并使用该模块公开的函数,但我不知道怎么做。
谢谢!
发布于 2018-09-13 20:35:16
我降级了,看起来一切都正常了。
https://stackoverflow.com/questions/52312082
复制相似问题