Typically you’d need type="module"
to be able to use import
in an HTML file:
<script type="module">
import { readTextFile, writeFile } from 'tauri/api/fs'
import { open, save } from 'tauri/api/dialog'
</script>
I have no idea if that works with Tauri, though.