requirejs blueimp fileuploader only loads min.js files and none other

前端 未结 2 494
半阙折子戏
半阙折子戏 2021-01-07 10:53

so I\'m a noobie to requirejs and backbone, but I\'m trying to load in all the dependencies for blueimp file uploader on my local machine and not load any external scripts.

相关标签:
2条回答
  • 2021-01-07 11:02

    Try using load-image instead load-image.min file from this source https://github.com/blueimp/JavaScript-Load-Image, Its works well for me :)

    0 讨论(0)
  • 2021-01-07 11:11
    shim: {
    
    backbone: {
      deps: ["lodash", "jquery"],
      exports: "Backbone"
    },
    
    bootstrap: { deps: ["jquery"] },
    widget: { deps: ["jquery"] },
    
    // backbone plugins
    "plugins/backbone.layoutmanager": ["backbone"], 
    "lib/jquery.fileupload": ["jquery", "widget"],
    "lib/jquery.fileupload-fp": ["jquery", "lib/load-image", "lib/canvas-to-blob",        
    "lib/jquery.fileupload"],
    "lib/jquery.fileupload-ui": ["jquery", "lib/tmpl", "lib/load-image",  
    "lib/jquery.fileupload-fp"]
    }
    

    And you have to replace paths by path variables from config in define[] part of all js files I have done the same and it is working for me.

    0 讨论(0)
提交回复
热议问题