.babelrc忽略字段似乎被忽略 [英] .babelrc ignore field seems to be ignored
问题描述
我在项目的根目录下有一个.babelrc
文件:
I've got a .babelrc
file at the root of a project:
{
"presets": ["es2015"],
"ignore": [
"src"
]
}
当我使用babel src --out-dir dist
进行编译时,src
文件夹仍会编译到dist
文件夹中.
When I compile it with babel src --out-dir dist
, the src
folder is still compiled onto the dist
folder.
但是,当我启动命令babel src --out-dir dist --ignore src
时,什么都没有编译.
However, when I launch the command babel src --out-dir dist --ignore src
, nothing is compiled.
为什么我的.babelrc
的ignore
属性被忽略?
Why is the ignore
property of my .babelrc
being ignored?
顺便说一句,我尝试了一些子文件夹或文件,并且发生了相同的问题.
By the way, I've tried with some subfolder or files, and the same issue occurs.
推荐答案
这是 issue 与babel-cli.
This was an issue with babel-cli.
它已在v6.14.0中修复.这是此版本的变更日志: https://github.com/babel/babel/releases/tag/v6.14.0
It has been fixed in v6.14.0. Here is the changelog for this version: https://github.com/babel/babel/releases/tag/v6.14.0
这篇关于.babelrc忽略字段似乎被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!