久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='RPzWP'></bdo><ul id='RPzWP'></ul>

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

      3. 如何解決 Gulp 上的這個縮小錯誤?

        How to solve this minification error on Gulp?(如何解決 Gulp 上的這個縮小錯誤?)

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

      4. <legend id='qY2Z6'><style id='qY2Z6'><dir id='qY2Z6'><q id='qY2Z6'></q></dir></style></legend><tfoot id='qY2Z6'></tfoot>
          • <bdo id='qY2Z6'></bdo><ul id='qY2Z6'></ul>
                <tbody id='qY2Z6'></tbody>
                <i id='qY2Z6'><tr id='qY2Z6'><dt id='qY2Z6'><q id='qY2Z6'><span id='qY2Z6'><b id='qY2Z6'><form id='qY2Z6'><ins id='qY2Z6'></ins><ul id='qY2Z6'></ul><sub id='qY2Z6'></sub></form><legend id='qY2Z6'></legend><bdo id='qY2Z6'><pre id='qY2Z6'><center id='qY2Z6'></center></pre></bdo></b><th id='qY2Z6'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qY2Z6'><tfoot id='qY2Z6'></tfoot><dl id='qY2Z6'><fieldset id='qY2Z6'></fieldset></dl></div>

                  本文介紹了如何解決 Gulp 上的這個縮小錯誤?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  運行此命令時遇到錯誤

                  gulp.task('minify', function () {返回一口.src('public/app/js/myapp.bundle.js').pipe(丑化()).pipe(gulp.dest('public/app/js/myapp.bundle.min.js'));});

                  <塊引用>

                  GulpUglifyError: 無法縮小 JavaScript 原因:SyntaxError: Unexpected token: name (MenuItem) (line: 1628, col: 18, pos: 53569)

                  該位置的代碼是這樣的

                   設(shè)置器:[],執(zhí)行:函數(shù)(){class MenuItem {//<-- 第 1628 行

                  怎么了?

                  解決方案

                  UglifyJS 目前不支持 EcmaScript 6 結(jié)構(gòu) 類似類.

                  您可能需要首先通過轉(zhuǎn)譯器步驟運行您的 JavaScript,或者找到一個知道如何處理 ES6 代碼的壓縮程序.

                  2017-06-17 更新

                  設(shè)計用于 ES6 的 UglifyJS 分支現(xiàn)已發(fā)布為 uglify-es 在 npm 上.

                  2018 年 9 月 10 日更新

                  terser 是新的 uglify-esuglify-es 不再維護.

                  如果使用 gulp 兩個 npmjs gulp-uglify-es 和 npmjs gulp-terser 軟件包支持 terser.

                  npm install gulp-terser --save-dev

                  const gulp = require('gulp');const terser = require('gulp-terser');函數(shù) es(){返回 gulp.src('./src/index.js').pipe(terser()).pipe(gulp.dest('./build'))}gulp.task('default', es);

                  I'm getting below error running this command

                  gulp.task('minify', function () {
                      return gulp
                        .src('public/app/js/myapp.bundle.js')
                        .pipe(uglify())
                        .pipe(gulp.dest('public/app/js/myapp.bundle.min.js'));
                  });
                  

                  GulpUglifyError: unable to minify JavaScript Caused by: SyntaxError: Unexpected token: name (MenuItem) (line: 1628, col: 18, pos: 53569)

                  Code on that location is this

                   setters: [],
                   execute: function () {
                       class MenuItem {  // <-- line 1628
                  

                  What's wrong?

                  解決方案

                  UglifyJS does not currently support EcmaScript 6 structures like classes.

                  You'll probably need to run your JavaScript through a transpiler step first, or find a minifier that knows what to do with ES6 code.

                  Update 2017-06-17

                  The branch of UglifyJS that is designed to work with ES6 is now published as uglify-es on npm.

                  Update 2018-09-10

                  terser is the new uglify-es, uglify-es is no longer maintained.

                  If using gulp both npmjs gulp-uglify-es and npmjs gulp-terser packages support terser.

                  npm install gulp-terser --save-dev
                  

                  const gulp = require('gulp');
                  const terser = require('gulp-terser');
                   
                  function es(){
                    return gulp.src('./src/index.js')
                      .pipe(terser())
                      .pipe(gulp.dest('./build'))
                  }
                  
                  gulp.task('default', es);
                  

                  這篇關(guān)于如何解決 Gulp 上的這個縮小錯誤?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務(wù)?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務(wù))
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)

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

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

                          <tbody id='XlHvJ'></tbody>

                        <legend id='XlHvJ'><style id='XlHvJ'><dir id='XlHvJ'><q id='XlHvJ'></q></dir></style></legend>
                          <bdo id='XlHvJ'></bdo><ul id='XlHvJ'></ul>
                            <tfoot id='XlHvJ'></tfoot>

                          • 主站蜘蛛池模板: 91久久久久久久久久久 | 福利片一区二区 | 欧美激情精品久久久久久变态 | 成人精品鲁一区一区二区 | 亚洲国产精品久久久久 | 看真人视频一级毛片 | av国产精品| 久国产精品 | 91久久久www播放日本观看 | 国产精品成人在线播放 | 你懂的免费在线 | 中文字幕国产精品 | 亚洲精品永久免费 | 久久这里只有 | 一道本不卡视频 | 国产一区二区观看 | 99久久99| 97久久精品午夜一区二区 | 能看的av网站 | 97超碰人人 | 成人在线免费视频 | 女同久久另类99精品国产 | 日批日韩在线观看 | 中文字幕在线免费观看 | 国产精品久久久久久久久久久久 | 国产亚洲欧美日韩精品一区二区三区 | 欧美黄色一区 | 天天人人精品 | 中文在线а√在线8 | 亚洲一区久久 | 精品欧美乱码久久久久久 | 国产精品夜夜春夜夜爽久久电影 | 日韩高清不卡 | 国产成人免费视频 | 亚洲精品资源 | 狠狠狠 | 91视频免费视频 | 国产剧情一区 | 免费视频二区 | 国产精华一区 | 成人在线精品视频 |