.babelrc ignore field seems to be ignored

淺唱寂寞╮ 提交于 2020-01-01 04:07:10

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!