question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option 'ignore' isn't working

See original GitHub issue
var jsArray = [
  'development/js/colors.js',
  'development/js/scripts.js',
];

var babelIgnore = [
  'development/js/scripts.js',
];

gulp.task('javascript', function() {
  return gulp.src(jsArray, { base: 'development/js' })
  .pipe(babel({
    presets: ['latest'],
    ignore: babelIgnore
  }))
   /* other tasks */
  .pipe(gulp.dest(dest));
}); 

The scripts.js file continues to get run through the babel task…

I also tried this ignore: ['development/js/**/**.js'] but everything was still being ran through babel…

Is there something I’m doing wrong? Can’t find guidance on this anywhere so I made an issue.

Relevant package versions “babel-preset-latest”: “^6.22.0” “gulp”: “^3.9.1” “gulp-babel”: “^6.1.2”

Node version 7.4.0

Windows 10

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
saswebcommented, Feb 7, 2018

It works in .babelrc file.

0reactions
morganneycommented, Aug 17, 2019

As a workaround you can just use the ignore option for gulp.src.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ignore option is not working · Issue #45 · vercel/micro-dev
This is not working for me. I even asked a mod on the Slack how to properly ignore files a few weeks ago...
Read more >
git - Gitignore not working - Stack Overflow
@Ahmad's answer is working but if you just want to git ignore 1 specific file ... --cached Use this option to unstage and...
Read more >
Ignore option not working - Support - Codecov
I'm trying to ignore some java auto-generated files from coverage using the ignore option but it is still showing up in the reports....
Read more >
How to fix .gitignore not working on your repository
Make a commit to your Git repository, and then;; Set up your .gitignore list. Then the .gitignore list will NOT ignore files that...
Read more >
Help!! Spelling check Ignore options are not working
As I recall (and as would make sense), if you used one of the those options on a word that is flagged as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found