How to handle 'code generator has deoptimised styling' message from gulp-babel

这一生的挚爱 提交于 2020-01-01 03:12:07

问题


I've just employed gulp-babel to my gulp file with the following

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

return gulp.src(files.concat.js.myModule)
  .pipe(babel())
  .pipe(concat('myModule.js'))
  .pipe(gulp.dest('path/to/js'));

...and I get the following Note about deoptimising the styling in my gulp output:

NOTE: The code generator has deoptimised the styling ... as it exceeds the max of "100KB"

Is this a problem?
Should I be handling this is some way?


回答1:


Turns out the compact option is set to auto by default which removes "superfluous whitespace characters and line terminators [...] on input sizes >100KB".

If this is not what you want, you can set the compact option to false...

.pipe(babel({compact: false}))


来源:https://stackoverflow.com/questions/30879773/how-to-handle-code-generator-has-deoptimised-styling-message-from-gulp-babel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!