Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

239
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda