I want to compile my src
folder to my build
folder but gulp-babel
doesn't create any file and I don't see any errors.
gulp.task('build', () => {
gulp
.src(['./src/**/*.js'])
.pipe(
babel({
presets: ['@babel/preset-env']
})
)
.pipe(gulp.dest('build/'))
})
Log:
[10:52:18] Starting 'build'...
[10:52:18] Finished 'build' after 5.85 ms
I got a similar source and destination for my SCSS files and it works perfectly, so it's not a path issue as far as I know.
packages.json
"@babel/cli": "^7.1.5",
"@babel/core": "^7.1.6",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-proposal-decorators": "^7.1.6",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.1.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.1.6",
"@babel/preset-typescript": "^7.1.0",
"@babel/traverse": "^7.1.4",
"eslint": "^5.0.1",
"eslint-config-prettier": "^3.1.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-security": "^1.4.0",
"gulp": "^3.9.1",
"gulp-babel": "^8.0.0",
"gulp-nodemon": "^2.4.1",
"gulp-sass": "^4.0.2",
"node-sass": "^4.10.0",
"nodemon": "^1.11.0",
"typescript-eslint-parser": "^21.0.0",