mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-09 11:16:39 -05:00
Replace babel-preset-es2015 with babel-preset-env configured for the last 6 browser versions to improve speed and performance
This commit is contained in:
parent
44281d132c
commit
3d4d2bcd6f
3 changed files with 14 additions and 3 deletions
11
.babelrc
Normal file
11
.babelrc
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
presets: [
|
||||
[
|
||||
"env", {
|
||||
"targets": {
|
||||
"browsers": [ "last 6 versions" ]
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
2
gulpfile.js
vendored
2
gulpfile.js
vendored
|
@ -79,7 +79,7 @@ function processJavaScript(ouputFilename, inputFiles, es6) {
|
|||
.pipe(gPlumber(plumberError))
|
||||
.pipe(gConcat(ouputFilename + ".js"));
|
||||
|
||||
if (es6) { javascript.pipe(gBabel({ presets: [ "es2015" ] })); }
|
||||
if (es6) { javascript.pipe(gBabel()); }
|
||||
if (prod) { javascript.pipe(gStripDebug()).pipe(gUglify()); }
|
||||
return javascript.pipe(gulp.dest("public/js/"));
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
"gulp-livereload": "^3.8.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"autoprefixer": "^7.1.4",
|
||||
"autoprefixer": "^7.1.6",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-env": "^1.6.1",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-babel": "^7.0.0",
|
||||
"gulp-concat": "^2.6.1",
|
||||
|
|
Loading…
Reference in a new issue