babel和eslint配置文件位置

来源:5-5 底部tab按钮开发(集成ESlint)

Mi_Rai

2019-07-10

我记得默认应该是要放在根目录的吧,为什么这里写到src目录下也能生效?

写回答

1回答

吕小鸣

2019-07-10

同学你好,根据babel官方解释,不一定非要放在根目录哈

Babel will look for a .babelrc in the current directory of the file being transpiled.
If one does not exist, it will travel up the directory tree until it finds either a .babelrc,or a package.json with a "babel": {} hash within.

来自babelrc

1
0

移动Web App开发之实战美团外卖

运用React全家桶技术,从0到1学习全面的移动 Web APP 开发技术。

389 学习 · 235 问题

查看课程