问题
I've got a .babelrc file at the root of a project:
{
"presets": ["es2015"],
"ignore": [
"src"
]
}
When I compile it with babel src --out-dir dist, the src folder is still compiled onto the dist folder.
However, when I launch the command babel src --out-dir dist --ignore src, nothing is compiled.
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.
回答1:
This was an issue with babel-cli.
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
来源:https://stackoverflow.com/questions/34444716/babelrc-ignore-field-seems-to-be-ignored