I have uppy v2 working and trying to move to v3 and it seems now that it is script module is causing a problem. I have an index page into which I am loading pages via ajax. In the index page I have
<script type="module">
import { Uppy, Dashboard } from 'https://releases.transloadit.com/uppy/v3.27.3/uppy.min.mjs';
</script>
as the first script tag after the body.
Then in my ajax page I am trying to init uppy. Note I am not using node as a webserver.
<script>
debugger;
const uppy = new Uppy()
uppy.use(Dashboard, { target: '#uppy', inline: true })
new Uppy is undefined. I dont seem to be able to load the module in the ajax page as get " import declarations may only appear at top level of a module" error. Obvs this is a limitation in my js understanding.
Can someone put me out of my misery.
Thanks