babel / gulp-babel

Gulp plugin for Babel
https://babeljs.io
MIT License
1.32k stars 120 forks source link

RangeError: Maximum call stack size exceeded when minifying Kendo UI #196

Open Wildenhaus opened 4 years ago

Wildenhaus commented 4 years ago

Attempting to minify Kendo UI results in a RangeError. This appears to be a regression from v7.0.1. This occurs with Kendo UI v2015.1.429. This does not appear to affect the latest version of Kendo UI.

Dependencies:

"dependencies": {
    "@babel/core": "7.7.4",
    "babel-preset-minify": "0.5.1",
    "gulp": "^4.0.0",
    "gulp-babel": "8.0.0"
  }

Gulp Task:

const gulp = require('gulp');
const babel = require('gulp-babel');

gulp.task('min-kendo-test', function () {
    return gulp.src('Scripts/kendo/kendo.all.js')
        .pipe(babel({ presets: ['minify'] }))
        .pipe(gulp.dest('Cooked/'));
});

Attempting to minify kendo.all.js results in the following output:

"C:\Code\Gulpfile.js" min-kendo-test
[09:38:59] Using gulpfile C:\Code\Gulpfile.js
[09:38:59] Starting 'min-kendo-test'...
[09:39:04] 'min-kendo-test' errored after 5.76 s
[09:39:04] RangeError in plugin "gulp-babel"
Message:
    C:\Code\Scripts\kendo\kendo.all.js: Maximum call stack size exceeded
Process terminated with code 1.