.babelrc忽略字段似乎被忽略 [英] .babelrc ignore field seems to be ignored

查看:156
本文介绍了.babelrc忽略字段似乎被忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在项目的根目录下有一个.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.

为什么我的.babelrcignore属性被忽略?

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆