mardi 5 avril 2016

how to use jquery file upload with ember browserify

I'm trying to use jquery file upload with ember-cli using the npm package http://ift.tt/25I9kKO

and ember browserify.

I installed ember-browserify and blueimp-file-upload:

$ npm install --save-dev ember-browserify
$ npm install --save-dev blueimp-file-upload

Importing fileupload like so:

import fileupload from 'npm:blueimp-file-upload';

Gave me this error: Cannot find module 'jquery' from '/Users/tony/src/myapp/node_modules/blueimp-file-upload/js/vendor’

So I installed jquery via npm as well:

$ npm install --save-dev jquery

Now I just get this error when trying to use fileupload:

$(...).fileupload is not a function

Is there a better way to use jquery-fileupload with ember-cli?




1 commentaire:

  1. Try this:
    import fileupload from 'blueimp-file-upload';
    (without "npm:" prefix)

    RépondreSupprimer