How to use blueimp-file-upload with webpack?

前端 未结 9 1953
无人共我
无人共我 2021-02-05 08:46

I\'m using blueimp-file-upload in my website, and I\'m using webpack to organize my js code.

I installed blueimp-file-upload and jquery.ui.widget from NPM



        
9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 08:58

    I had almost identical problem, except that Error announced not 'jquery.ui.widget' but 'jquery/ui/widget'.
    For me @Gowrav answer was wrong way.

    After days of straying I've solved it in the simple way. Just did:

    npm install jquery-ui
    

    The fact is that jquery.fileupload.js searching for its vendor:

    But in context where jquery.fileupload.js is trying to import dependency, of course, it can't be found (resolved). So I add it to project instead.

    P.S. It's just my opinion about how does all work. But this way has helped me.

提交回复
热议问题