I'm having a lot of trouble figuring out how to add a 3rd-party JavaScript library to Aurelia (in this case dropzone.js).
I've installed dropzone via npm and configured it in aurelia.json:
{
"name": "dropzone",
"path": "../node_modules/dropzone/dist/min",
"main": "dropzone.min",
"resources": [
"dropzone.min.css"
]
}
And added the require statement for the CSS to my app.html:
<require from="dropzone/dropzone.min.css"></require>
However, when I try to do a simple test like just putting the HTML directly in my template, the functionality does not work.
<template>
<form action="/file-upload" class="dropzone" id="my-awesome-dropzone"></form>
</template>
I've also tried this solution but couldn't get it working as well: Dropzone implementation in Aurelia not working in Component
import Dropzone from 'dropzone';,import {Dropzone} from 'dropzone';andimport * from 'dropzone';- user7286765