Question

I am simply including the script dropzone.js.

When doing this:

var dropZone = new Dropzone(..., {
  url: '...'
});

I get the following javascript error message:

Uncaught ReferenceError: Dropzone is not defined 

I have also requirejs coming from the platform we're running automatically but I don't want to use that. Could that have anything to do with it not working?

Was it helpful?

Solution

You can disable RequireJS for a single file by setting define.amd to false:

<script>
    window.oldDefineAmd = define.amd;
    define.amd = false;
</script>
<script src="dropzone.js"></script>
<script>define.amd = window.oldDefineAmd;</script>

http://jsfiddle.net/Pxp5L/5/

But note that this can break all kinds of stuff.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top