How to use blueimp-file-upload with webpack?

前端 未结 9 1958
无人共我
无人共我 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条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-05 08:52

    actually you can solve this by changing your webpack config, just add the path to resolve (for example I am using bower)

    resolve: {
        extensions: [ '', '.js', '.jsx' ],
        modulesDirectories: [
           'node_modules',
           'bower_components', 
           'bower_components/blueimp-file-upload/js/vendor' 
        ]
    }
    

提交回复
热议问题