Answer the question
In order to leave comments, you need to log in
Why is Gulp-Uglify's keep_fnames setting not working?
It is necessary that gulp-uglify does not minimize function names during minification (variable names need to be minimized), in order to be able to get the class name in es6 (babel) through this.constructor.name. With minification gives the name of the minified function - 'e'.
I set the keep_fnames parameter, but uglify successfully ignores it, and produces the same code, both with true and false.
.pipe(uglify({
compress: {
'keep_fnames': true
}
}))
Answer the question
In order to leave comments, you need to log in
Try like this:
.pipe(uglify({
mangle: {
keep_fnames: true
}
}))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question