Answer the question
In order to leave comments, you need to log in
How to configure Babel to show build errors?
Good afternoon. I wrote a task for Babel in the Gulp collector, everything works, but if you make a mistake, for example, declare the same variable twice:
let red = document.querySelector('.class');
let red = document.querySelector('.class');
then babel will run and then finish building, but in the end nothing will change in the output.
But if you write npx babel src/app.js --out-dir dist/js in the console,
then you will immediately get an error and a description of the error and why this error.
How to set up a tax so that it gives me an error if something goes wrong.
Task:
gulp.task('babel-build', function () {
return gulp.src('src/app.js').pipe(babel({
presets: ['@babel/env']
}))
.pipe (gulp.dest('
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question