Answer the question
In order to leave comments, you need to log in
Babel() not working in Gulp?
Good afternoon!
I am building Gulp for my project, but for some reason, when building Js, it does not get into the output folder (build), I found out that Babel is to blame for all this, js is generated without it.
package.json
"devDependencies"{
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.0",
"gulp-babel": "^8.0.0"
}
function JS(done) {
gulp.src(path.src.js)
.pipe(babel())
.pipe(uglify({ annotations: false }))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest(path.app.js))
.pipe(browserSync.stream());
done();
}
{
"presets": ["@babel/preset-env"]
}
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