• <legend id='2b8eK'><style id='2b8eK'><dir id='2b8eK'><q id='2b8eK'></q></dir></style></legend>

        <tfoot id='2b8eK'></tfoot>
      1. <i id='2b8eK'><tr id='2b8eK'><dt id='2b8eK'><q id='2b8eK'><span id='2b8eK'><b id='2b8eK'><form id='2b8eK'><ins id='2b8eK'></ins><ul id='2b8eK'></ul><sub id='2b8eK'></sub></form><legend id='2b8eK'></legend><bdo id='2b8eK'><pre id='2b8eK'><center id='2b8eK'></center></pre></bdo></b><th id='2b8eK'></th></span></q></dt></tr></i><div id='2b8eK'><tfoot id='2b8eK'></tfoot><dl id='2b8eK'><fieldset id='2b8eK'></fieldset></dl></div>
      2. <small id='2b8eK'></small><noframes id='2b8eK'>

        • <bdo id='2b8eK'></bdo><ul id='2b8eK'></ul>

        GulpUglifyError:无法缩小 JavaScript

        时间:2023-05-29

            <small id='4imcS'></small><noframes id='4imcS'>

              <bdo id='4imcS'></bdo><ul id='4imcS'></ul>

                <tbody id='4imcS'></tbody>

              <legend id='4imcS'><style id='4imcS'><dir id='4imcS'><q id='4imcS'></q></dir></style></legend>

              <i id='4imcS'><tr id='4imcS'><dt id='4imcS'><q id='4imcS'><span id='4imcS'><b id='4imcS'><form id='4imcS'><ins id='4imcS'></ins><ul id='4imcS'></ul><sub id='4imcS'></sub></form><legend id='4imcS'></legend><bdo id='4imcS'><pre id='4imcS'><center id='4imcS'></center></pre></bdo></b><th id='4imcS'></th></span></q></dt></tr></i><div id='4imcS'><tfoot id='4imcS'></tfoot><dl id='4imcS'><fieldset id='4imcS'></fieldset></dl></div>
              <tfoot id='4imcS'></tfoot>

                  本文介绍了GulpUglifyError:无法缩小 JavaScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在尝试缩小我正在使用 gulp 任务运行程序的脚本文件我正在尝试 gulp-uglify 插件

                  I am trying to minify my script files for which i am using gulp task runner And I am trying gulp-uglify plugin

                  代码:

                   gulp.task('concat', function() {
                      return gulp.src('app/**/*.js')
                          // .pipe(concat('script.js'))
                          .pipe(uglify())
                          .pipe(gulp.dest('./dist/'))
                  });
                  

                  但我收到错误

                  当我尝试将 gulp 任务作为 gulp concat 运行时任何帮助将不胜感激

                  when i try to run gulp task as gulp concat Any help would be appreciated

                  推荐答案

                  主要错误是在使用 ES6 格式时产生的.使用 gulp-uglify-es 模块而不是 'gulp-uglify' 来克服这个错误.

                  The main error is generated when you're using ES6 format. Use the gulp-uglify-es module instead of 'gulp-uglify' to overcome this error.

                  var uglify = require('gulp-uglify-es').default;
                  

                  注意:gulp-uglify-es 不再维护.您可能想使用 terser/gulp-terser 代替:

                  Note: gulp-uglify-es is no longer being maintained. You may want to use terser/gulp-terser instead:

                  这篇关于GulpUglifyError:无法缩小 JavaScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何 Gulp-Watch 多个文件? 下一篇:UglifyJS 抛出意外的标记:keyword (const) with node_modu

                  相关文章

                  最新文章

                  <tfoot id='rYqpi'></tfoot>
                    <bdo id='rYqpi'></bdo><ul id='rYqpi'></ul>

                  <small id='rYqpi'></small><noframes id='rYqpi'>

                    <legend id='rYqpi'><style id='rYqpi'><dir id='rYqpi'><q id='rYqpi'></q></dir></style></legend>

                      <i id='rYqpi'><tr id='rYqpi'><dt id='rYqpi'><q id='rYqpi'><span id='rYqpi'><b id='rYqpi'><form id='rYqpi'><ins id='rYqpi'></ins><ul id='rYqpi'></ul><sub id='rYqpi'></sub></form><legend id='rYqpi'></legend><bdo id='rYqpi'><pre id='rYqpi'><center id='rYqpi'></center></pre></bdo></b><th id='rYqpi'></th></span></q></dt></tr></i><div id='rYqpi'><tfoot id='rYqpi'></tfoot><dl id='rYqpi'><fieldset id='rYqpi'></fieldset></dl></div>