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

  • <legend id='wPFco'><style id='wPFco'><dir id='wPFco'><q id='wPFco'></q></dir></style></legend>

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

        <tfoot id='wPFco'></tfoot>

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

      1. Uglify SyntaxError: Unexpected token: punc ())

        Uglify SyntaxError: Unexpected token: punc ())(Uglify SyntaxError: Unexpected token: punc ()))

        <tfoot id='efm0V'></tfoot>
              <tbody id='efm0V'></tbody>
              <bdo id='efm0V'></bdo><ul id='efm0V'></ul>
            • <legend id='efm0V'><style id='efm0V'><dir id='efm0V'><q id='efm0V'></q></dir></style></legend>

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

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

                  本文介紹了Uglify SyntaxError: Unexpected token: punc ())的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我正在嘗試使用 gulp 來縮小包含 JS 文件的文件夾.但是,其中一個文件存在上述錯誤,導致無法對其進行縮小.

                  I am trying to use gulp in order to minify a folder containing JS files. However, one of the files has the above error, preventing it from being minified.

                  我設(shè)法捕獲并打印了錯誤,我在此處部分打印了該錯誤:

                  I managed to catch and print the error, which I've partially printed here:

                  JS_Parse_Error {
                   message: 'SyntaxError: Unexpected token: punc ())',
                   filename: 'ex.js',
                   line: 189,
                   col: 25,
                   pos: 6482,
                   stack: Error
                      at new JS_Parse_Error (eval at <anonymous> ... ) 
                   plugin: 'gulp-uglify',
                   fileName: '.../js/ex.js',
                   showStack: false
                  }
                  

                  相關(guān)文件包含以下內(nèi)容,已縮短:

                  The file in question contains the following, shortened:

                  function() {
                    ...
                    $.confirm({
                      buttons: {
                          confirm: function() {
                              $.post('/ajax-handler', {
                                      ...
                                  })
                                  .done( function(response) {
                                      var data = filterResponse(response);
                                      if (data['status'] == 'success') {
                                          sleep(1000).then(() => {
                                      *       ...
                                          });
                                          sleep(5000).then(() => {
                                              ...  
                                          });
                  
                                      } else {
                                          console.log('Oops!');
                                      }
                                  })
                                  .fail( function(err, status, response) {
                                      ...
                              });
                          },
                          cancel: function() {}
                      }
                   });
                    ...
                  }
                  

                  我在上面添加了*"以指示 JS_Parse_Error 列出的確切位置.

                  I added the "*" above in order to indicate the exact position listed by JS_Parse_Error.

                  推薦答案

                  //更新

                  來自評論~ @imolit

                  切換回 uglify-js(uglify-es 已棄用,如果需要 uglify ES6 代碼請使用 terser-webpack-plugin).

                  ?v2.0.0 (2018-09-14)?- BREAKING CHANGES (link)

                  Switch back to uglify-js (uglify-es is abandoned, if you need uglify ES6 code please use terser-webpack-plugin).

                  <小時>

                  我希望你能從這個適用于 webpack 的解決方案中得到啟發(fā).(以下鏈接)

                  I hope you can get inspired by this solution which works with webpack. (link below)

                  UglifyJS 有兩個版本 - ES5ES6 (Harmony),在 git 上查看
                  ES5 版本默認包含所有插件,但如果您明確安裝 Harmony 版本,這些插件將使用它.

                  There are two versions of UglifyJS - ES5 and ES6 (Harmony), see on git
                  ES5 version comes by default with all the plugins, but if you install a Harmony version explicitly, those plugins will use it instead.

                  package.json

                  package.json

                  "uglify-js": "git+https://github.com/mishoo/UglifyJS2.git#harmony"
                  

                  npm install --save uglify-js@github:mishoo/UglifyJS2#harmony
                  
                  yarn add git://github.com/mishoo/UglifyJS2#harmony --dev
                  

                  <小時>

                  網(wǎng)頁包

                  要與 webpack 一起使用,還要安裝 webpack 插件


                  Webpack

                  To use it with webpack install also the webpack plugin

                  npm install uglifyjs-webpack-plugin --save-dev
                  
                  yarn add uglifyjs-webpack-plugin --dev
                  

                  然后導入手動安裝的插件

                  then import the manually installed plugin

                  var UglifyJSPlugin = require('uglifyjs-webpack-plugin');
                  

                  并在代碼中替換它

                  -  new webpack.optimize.UglifyJsPlugin({ ... })
                  +  new UglifyJSPlugin({ ... })
                  

                  <小時>

                  有關(guān)更多 webpack 信息(安裝/使用),請參閱 https://github.com/webpack-contrib/uglifyjs-webpack-plugin#install

                  這篇關(guān)于Uglify SyntaxError: Unexpected token: punc ())的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 崩潰)
                    <tbody id='uk7gx'></tbody>

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

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

                          • <tfoot id='uk7gx'></tfoot>
                            <legend id='uk7gx'><style id='uk7gx'><dir id='uk7gx'><q id='uk7gx'></q></dir></style></legend>
                          • 主站蜘蛛池模板: 一区二区av | 国产乱码精品一品二品 | 免费观看毛片 | 欧美成视频 | 婷婷丁香在线视频 | 欧美一区二区三区的 | 国产色在线 | 日韩精品久久久久久 | 日韩中文一区 | 翔田千里一区二区 | 欧美一级全黄 | 国产高清一区二区三区 | 黄色播放| 美国一级黄色片 | 国产精品美女一区二区 | 久久国产欧美日韩精品 | 亚洲一区国产精品 | 欧美aⅴ在线观看 | 日韩欧美一区二区三区在线播放 | 久久久精品影院 | 精品久久国产老人久久综合 | 国产亚洲精品久久19p | 久久久久久久一区二区三区 | 爱爱视频在线观看 | 国产探花在线精品一区二区 | 九九伊人sl水蜜桃色推荐 | 伊人网站在线 | 久久亚洲精品国产精品紫薇 | 黄色成人在线 | 狠狠爱免费视频 | 综合久久综合久久 | 97精品国产97久久久久久免费 | 亚洲精品视频在线播放 | 超碰在线播 | 午夜精品久久久久久久久久久久久 | 国产精品久久久亚洲 | 日韩欧美国产精品 | 91久久 | 午夜精品久久久久久久 | 亚洲一区毛片 | 91成人小视频 |