mirror of
https://github.com/go-gitea/gitea
synced 2024-08-27 17:53:41 +02:00
- unvendor dropzone and upgrade it from 4.2.0 to 5.7.0 - make `csrf` available on window.config
10 lines
320 B
JavaScript
10 lines
320 B
JavaScript
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);
|
|
}
|