为什么我run build的时候提示这个?
来源:5-2 babel环境安装(2)
lcyjerry
2020-04-30 14:55:25
WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel, we recommend explicitly setting the core-js version you are using via the `corejs` option.
You should also be sure that the version you pass to the `corejs` option matches the version specified in your `package.json`'s `dependencies` section. If it doesn't, you need to run one of the following commands:
4回答
好帮手慕慕子
2020-04-30
同学你好,看你截图可能是build配置不对,没有配置编译后输出到哪个文件

建议修改为:
"build": "babel entry.js -o index.js -w"
同学可以测试下,如果还有问题,可以将你写的代码和文件目录截图也粘贴过来,便于帮助同学准确的定位与解决问题。
祝学习愉快~
lcyjerry
提问者
2020-04-30


好帮手慕慕子
2020-04-30
同学你好, 由于环境等问题,老师这边测试无法复现同学的问题,这个是警告信息不是错误信息,不会影响同学的代码运行,同学可以忽略的,重点放在课程内容的学习上。
如果影响到了同学代码效果的实现,可以将你node版本号和具体操作的步骤以及配置文件图文结合粘贴过来,老师帮助同学再测试下
祝学习愉快~
好帮手慕慕子
2020-04-30
同学你好,这是一个警告提示信息,即:警告在使用useBuiltIns选项时,需要声明core-js的版本,不会影响代码的正常运行,同学可以忽略的。祝学习愉快~
相似问题