久久久久久久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.

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

                  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
                  }
                  

                  相關文件包含以下內容,已縮短:

                  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 的解決方案中得到啟發.(以下鏈接)

                  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
                  

                  <小時>

                  網頁包

                  要與 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({ ... })
                  

                  <小時>

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

                  這篇關于Uglify SyntaxError: Unexpected token: punc ())的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  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 以使其以不同的方式運行任務?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                  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>
                          • 主站蜘蛛池模板: 欧美精品一区二区在线观看 | 日韩中文一区 | 成人久久18免费 | 婷婷91| 欧美电影在线观看网站 | 精品在线观看一区 | 欧美激情视频一区二区三区免费 | 亚洲福利一区 | 国产午夜精品一区二区三区四区 | 二区在线观看 | 中文字幕在线一区 | 国产成人福利视频 | 久久看看| 日韩电影免费在线观看中文字幕 | 一级高清免费毛片 | 久久成 | com.色.www在线观看 | 亚洲视频在线看 | 欧美黄色片 | 日韩91| 成人欧美一区二区三区黑人孕妇 | 日韩欧美在线播放 | 欧美日韩国产中文字幕 | 国产一级在线 | 亚洲 欧美 另类 综合 偷拍 | 国产福利资源在线 | 99pao成人国产永久免费视频 | 国产伦精品一区二区三区四区视频 | 欧美a在线观看 | 一区二区三区在线播放视频 | 午夜免费福利片 | 国产精品色综合 | 亚洲激情视频在线 | av在线免费观看网站 | 断背山在线观看 | 亚洲va欧美va人人爽午夜 | 青青草综合网 | 请别相信他免费喜剧电影在线观看 | 国产视频日韩 | 日韩精品免费在线 | 玖玖在线免费视频 |