Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

241
Views
Babel doesn't ignore snapshot folder and files

I'm using the following npm build script with Babel 7;

"build": "rm -rf dist && babel src/lib --out-dir dist --copy-files --no-copy-ignored",

And this is my ignore section in my .babelrc.json file;

"ignore": [
  "**/__mocks__",
  "**/__snapshots__",
  "**/*.snap",
  "**/*.test.js"
]

Despite successfully being ignored matched test.js files and __mocks__ folder, __snapshots__ folder and files with .snap extension is not being ignored they're being copied to the dist folder.

Installed devDependencies;

"devDependencies": {
  "@babel/cli": "^7.17.0",
  "@babel/core": "^7.17.0",
  "@babel/preset-env": "^7.16.11",
  ...
}

Any idea what's wrong?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I've wasted an inordinate amount of time on this. It is apparently a bug: https://github.com/babel/babel/issues/11394. File that are not considered compilable by babel are not ignored. There is a fix using the --extension flag that allows you to modify what files babel considers compilable.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!