babel / babel/gulp-babel

Gulp babel not transpiling to es5

Open
#167 23 comments 21 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.3k
Forks
113
PR merge metrics
No merged PRs in 30d

Description

I installed gulp babel (and dependencies) and when running gulp, same es6 code is being output in dist. I tried adding .babelrc to specify preset as well as specifying preset in gulp.

Is there anything I am missing?

gulpfile
```
var gulp = require('gulp');
var babel = require('gulp-babel');

gulp.task( 'customJS', function() {
gulp.src( [ jsCustomSRC ] )
.pipe( concat( jsCustomFile + '.js' ) )
.pipe(babel({
presets: ['@babel/env']
}))
.pipe( gulp.dest( jsDestination ) )
});
```

.babelrc
```
{
"presets": ["@babel/env"]
}
```

package.json
```
"devDependencies": {
"@babel/core": "^7.1.5",
"@babel/preset-env": "^7.1.5",
"gulp": "^4.0.0",
"gulp-babel": "^8.0.0",
"gulp-concat": "^2.5.2"
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the gulpfile, .babelrc, and package.json shown in the report, then review the issue discussion for the reported setup and diagnosis. Reproduce the Gulp task and inspect the generated files in dist. Done means the configured source is transpiled to ES5 without breaking the existing concatenation workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.