如何处理来自 gulp-babel 的 'code generator has deoptimised styling' 消息

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

我刚刚将 gulp-babel 用于我的 gulp 文件,其中包含以下内容

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

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

...我得到以下 Note 关于取消优化我的 gulp 输出中的样式:

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

有问题吗?
我应该以某种方式处理这个问题吗?

原来 compact 选项默认设置为 auto,这会删除 "superfluous whitespace characters and line terminators [...] on input sizes >100KB"。

如果这不是您想要的,您可以将 compact option 设置为 false...

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