diff options
Diffstat (limited to 'web_src/js/features/dropzone.js')
-rw-r--r-- | web_src/js/features/dropzone.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web_src/js/features/dropzone.js b/web_src/js/features/dropzone.js new file mode 100644 index 0000000000..f5d5b36a18 --- /dev/null +++ b/web_src/js/features/dropzone.js @@ -0,0 +1,9 @@ +export default async function createDropzone(el, opts) { + const [{ default: Dropzone }] = await Promise.all([ + import(/* webpackChunkName: "dropzone" */'dropzone'), + import(/* webpackChunkName: "dropzone" */'dropzone/dist/dropzone.css'), + ]); + + Dropzone.autoDiscover = false; + return new Dropzone(el, opts); +} |