diff --git a/packages/babel-register/README.md b/packages/babel-register/README.md index ce0ab6d7f3..b07b4a3c8a 100644 --- a/packages/babel-register/README.md +++ b/packages/babel-register/README.md @@ -39,7 +39,7 @@ override this by passing an ignore regex via: require("@babel/register")({ // This will override `node_modules` ignoring - you can alternatively pass // an array of strings to be explicitly matched or a regex / glob - ignore: false + ignore: [] }); ``` @@ -49,16 +49,16 @@ require("@babel/register")({ require("@babel/register")({ // Optional ignore regex - if any filenames **do** match this regex then they // aren't compiled. - ignore: /regex/, + ignore: [/regex/], // Ignore can also be specified as a function. - ignore: function(filename) { + ignore: [function(filename) { if (filename === "/path/to/es6-file.js") { return false; } else { return true; } - }, + }], // Optional only regex - if any filenames **don't** match this regex then they // aren't compiled